コード例 #1
0
 public void CheckListIsNotNull()
 {
     Mock<IPersonRepository> MockRepo = ListPerson(18);
     ServiceOfPerson Service = new ServiceOfPerson(MockRepo.Object);
     List<Person> ListOfPerson = Service.AdultPerson();
     List<Person> p1 = ListOfPerson;
     Assert.IsNotNull(p1);
 }
コード例 #2
0
 public void FindAdultPerson()
 {
     Mock<IPersonRepository> MockRepo = ListPerson(18);
     ServiceOfPerson Service = new ServiceOfPerson(MockRepo.Object);
     List<Person> ListOfPerson = Service.AdultPerson();
     Assert.AreEqual(2, ListOfPerson.Count);
     List<Person> p1 = ListOfPerson;
     Assert.AreEqual(p1, p1);
 }