I created a unit Test project for my CalculatorApp and added the app as a reference for my UniTest Project
My code looks like this:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CalculatorApp;
namespace CalculatorUnitTests
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestAddMethod()
{
decimal firstTestNumber = 7;
decimal secondTestNumber = 3;
decimal resultTest = 10;
Assert.AreEqual(resultTest, AddMethod(firstTestNumber, secondTestNumber));
}
}
But it says that AddMethod does not exist in the current context.
What am I missing? (i don't have much experience with unitTests) I am using Visual Studio Community 2015.
Aucun commentaire:
Enregistrer un commentaire