public void Does_Return_Value() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>() { 4 }; bool expectedResult = true; bool actualResult; //Act myList.ToString(); if (myList.ToString() == "4") { actualResult = true; } else { actualResult = false; } //Assert Assert.AreEqual(expectedResult, actualResult); }
public void Convert_Int_ToString() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>() { 1, 3, 3, 7 }; string expectedResult = "1337"; //Act string actualResult = myList.ToString(); //Assert Assert.AreEqual(expectedResult, actualResult); }
public void Convert_Double_ToString() { //Arrange CustomBuiltList <double> myList = new CustomBuiltList <double>() { 1.337, 1.338, 1.339, 4.1 }; string expectedResult = "1.3371.3381.3394.1"; //Act string actualResult = myList.ToString(); //Assert Assert.AreEqual(expectedResult, actualResult); }