public void AddTwo_Int_SecondArrayPosition() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value = 3; int value1 = 5; int expectedResult = 5; //Act myList.Add(value); myList.Add(value1); //Assert Assert.AreEqual(expectedResult, myList[1]); }
public void Count_Int_InList() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value1 = 5; int value2 = 1; int expectedResult = 2; //Act myList.Add(value1); myList.Add(value2); int actualResult = myList.Count; //Assert Assert.AreEqual(expectedResult, actualResult); }
public void AddTwo_Int_FirstArrayPosition() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value = 3; int value1 = 5; int expectedResult = 3; //Act myList.Add(value); myList.Add(value1); int actualResult = myList[0]; //Assert Assert.AreEqual(expectedResult, actualResult); }
public void RemoveAndAdd_Int_InList() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value = 1; int value1 = 4; int expectedResult = 1; //Act myList.Add(value); myList.Remove(value); myList.Add(value1); int actualResult = myList.Count; //Assert Assert.AreEqual(expectedResult, actualResult); }
public void Push_OneInt_IntoList() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value = 1; int expectedResult = 1; //Act myList.Add(value); //Assert Assert.AreEqual(expectedResult, myList.Count); }
public void Expand_Int_Count() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value = 1; int value1 = 4; int value2 = 7; int value3 = 3; int value4 = 2; int expectedResult = 5; ////Act myList.Add(value); myList.Add(value1); myList.Add(value2); myList.Add(value3); myList.Add(value4); int actualResult = myList.Count; ////Assert Assert.AreEqual(expectedResult, actualResult); }
public void Count_String_InList() { //Arrange CustomBuiltList <string> myList = new CustomBuiltList <string>(); string value = "test"; int expectedResult = 1; ////Act myList.Add(value); //Assert Assert.AreEqual(expectedResult, myList.Count); }
public void FindAfterAdd_String_InList() { //Arrange CustomBuiltList <string> myList = new CustomBuiltList <string>(); string value = "thing"; string expectedResult = "thing"; //Act myList.Add(value); string actualResult = myList[0]; //Assert Assert.AreEqual(expectedResult, actualResult); }
public void Count_Int_Capacity() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>(); int value = 1; int expectedResult = 4; //Act myList.Add(value); int actualResult = myList.Capacity; //Assert Assert.AreEqual(expectedResult, actualResult); }
public void Add_Int_EndOfLongList() { //Arrange CustomBuiltList <int> myList = new CustomBuiltList <int>() { 1, 5, 8, 7, 24, 57, 68, 4, 5, 6, 3, 4, 5, 9, 10, 30, 23, 43 }; int value = 45; int expectedResult = 43; //Act myList.Add(value); int actualResult = myList[17]; //Assert Assert.AreEqual(expectedResult, actualResult); }