コード例 #1
0
        public void ShouldNotFindForager()
        {
            ForagerRepositoryDouble repo    = new ForagerRepositoryDouble();
            ForagerService          service = new ForagerService(repo);

            List <Forager> result = service.FindByLastName("A");

            Assert.AreEqual(0, result.Count);
        }
コード例 #2
0
        public void ShouldFindForager()
        {
            //arrange
            ForagerRepositoryDouble repo    = new ForagerRepositoryDouble();
            ForagerService          service = new ForagerService(repo);

            //act
            List <Forager> result = service.FindByLastName("Sis");

            //assert
            Assert.AreEqual(1, result.Count);
            Assert.AreEqual("Jilly", result[0].FirstName);
        }