// Object is not in database and method should return null public void getByIDTest2() { int id = 99; SubEvent expected = null; SubEvent actual; actual = SubEventModel.getByID(id); Assert.AreEqual(expected, actual); }
// Method should return the object and not null public void getByIDTest() { int id = 9; SubEvent expected = new SubEvent(); expected.Name = "Test Event"; expected.EventId = 2; expected.VenueId = 1; SubEvent actual; actual = SubEventModel.getByID(id); Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.EventId, actual.EventId); Assert.AreEqual(expected.VenueId, actual.VenueId); }