public void AddInvalidObjectTest() { Assert.That(() => { _list.Add(new InvalidClass()); }, Throws.ArgumentException); }
public void TestToString() { // Arrage ListClass <string> list = new ListClass <string>(); // Act list.Add("Hello"); list.Add("World"); // Assert Assert.AreEqual("HelloWorld", list.ToString()); }
public void AddOnTest() { // Arrange ListClass <int> list = new ListClass <int>(); int one = 1; // Act list.Add(one); int two = list.listArray[0]; // Assert Assert.AreEqual(one, two); }
public void Add_FiveValues_ReturnsValueAtIndex() { // Arrage ListClass <int> list = new ListClass <int>() { 0, 1, 2, 3 }; int input = 7; // Act list.Add(input); //Assert Assert.AreEqual(7, list.listArray[4]); }
public void AddLength() { // Arrage ListClass <int> list = new ListClass <int>() { 0, 1, 2, 3 }; int input = 4; // Act list.Add(input); //Assert Assert.AreEqual(5, list.Counts); }
public void AddOnTwoTest() { // Arrange ListClass <int> list = new ListClass <int>() { 0, 2, 3 }; int one = 1; // Act list.Add(one); // Assert Assert.AreEqual(list.listArray[3], one); }