public void TestCocaCola_ShouldReturnFirstThreeITems() { //Arrange var cocaCola = new CocaCola(); var expected = new List <string> { "1", "2", "Coca" }; //Act var actual = cocaCola.GetCocaCola(3); //Assert CollectionAssert.AreEqual(expected, actual); }
public void TestCocaCola_100thPosition_ShouldReturnCola() { //Arrange var cocaCola = new CocaCola(); var position = 100; var expected = "Cola"; //Act var actualCocaColaList = cocaCola.GetCocaCola(position); var actual = actualCocaColaList.ElementAt(position - 1); //Assert Assert.AreEqual(expected, actual); }
public void TestCocaCola_ShouldReturnTwoIntegers() { //Arrange var cocaCola = new CocaCola(); var expected = new List <string> { "1", "2" }; //Act var actual = cocaCola.GetCocaCola(2); //Assert CollectionAssert.AreEqual(expected, actual); }
public void TestCocaCola_15thPosition_ShouldReturnCocaCola() { //Arrange var cocaCola = new CocaCola(); var position = 15; var expected = "CocaCola"; //Act var actualCocaColaList = cocaCola.GetCocaCola(position); var actual = actualCocaColaList.ElementAt(position - 1); // As list are 0 index based we need to acces the 14th item to get the correct //Assert Assert.AreEqual(expected, actual); }