예제 #1
0
        public void ReportFormat()
        {
            string missionName = "Test Mission";
              string animalName = "Animal Bob";
              DateTime timein = DateTime.Now;
              DateTime? timeout = null;

              var am = new AnimalMission()
              {
            MissionRoster = new MissionRoster {
              Mission = new Mission { Title = missionName },
              TimeIn = timein,
              TimeOut = timeout
            },
            Animal = new Animal { Name = animalName }
              };

              Assert.AreEqual(string.Format(AnimalMission.ReportFormat, am.MissionRoster.Mission.Title, am.Animal.Name, am.MissionRoster.TimeIn, am.MissionRoster.TimeOut), am.GetReportHtml());
        }
예제 #2
0
 public void Validate()
 {
     var am = new AnimalMission();
       Assert.IsTrue(am.Validate());
       Assert.IsEmpty(am.Errors);
 }
예제 #3
0
 public void Validate()
 {
     var am = new AnimalMission();
       Assert.AreEqual(0, am.Validate(null).Count());
 }