public void Component_CanTest_IfEqualNull() { //Arrange NSAComponent comp = new NSAComponent(); comp.ComponentID = 3; comp.Name = "Swiss"; comp.Category = "Cheese"; //Act bool actual = comp.Equals(null); //Assert bool expected = false; Assert.AreEqual(expected, actual, "Component is not handling if its equal to null correctly"); }
public void Component_CanTest_IfEqual() { //Arrange NSAComponent comp = new NSAComponent(); comp.ComponentID = 3; comp.Name = "Swiss"; comp.Category = "Cheese"; NSAComponent tester = new NSAComponent(); tester.ComponentID = 3; tester.Name = "American"; tester.Category = "Cheese"; //Act bool actual = comp.Equals(tester); //Assert bool expected = true; Assert.AreEqual(expected, actual, "Component is not testing if it is equal to another correctly"); }