public void Add_IntAddedToEmptyList_CountIncreasesByOne() { //Arrange FakeList <int> fakelist = new FakeList <int>(); int expectedCount = 1; //Act fakelist.Add(1); //Assert Assert.AreEqual(expectedCount, fakelist.Count); }
public void ToString_ListOfCustomCarClassObjects_CarClassToStringTestResult() { //Arrange Car car = new Car(); FakeList <Car> fakelist = new FakeList <Car>(); string expectedString = "ConsoleApplication3.Car"; //Act fakelist.Add(car); string resultingString = fakelist.ToString(); //Assert Assert.AreEqual(resultingString, expectedString); }
public void Add_ArrayOfIntegersAddedToEmptyList_AddedArray() { //Arrange FakeList <Array> fakelist = new FakeList <Array>(); int[] expectedResult = new int[2] { 1, 2 }; //Act fakelist.Add(expectedResult); //Assert Assert.AreEqual(expectedResult, fakelist[0]); }