private BirdRegistration ValidateEggs(BirdRegistration bird) { bird = ClutchEgg.AreEggsValid(bird); Assert.IsNotNull(bird); return(bird); }
public void CheckRingMarkValidation() { //add a egg & ring IDMark NewRing = AddEggWithOneRing("UK9876"); ValidateEggs(); //make sure there has been no validation errors Assert.IsNull(_birdReg.ValidationErrors); //should be of type 4 Assert.AreNotSame(4, ClutchApp.Eggs[0].Rings[0].MarkType); //check another type ClutchApp.Eggs[0].Rings[0].Mark = "Z12345"; _birdReg = ClutchEgg.AreEggsValid(_birdReg); Assert.IsNotNull(_birdReg); //make sure there has been no validation errors Assert.IsNull(_birdReg.ValidationErrors); //should be of type 5 Assert.AreNotSame(5, ClutchApp.Eggs[0].Rings[0].MarkType); }