コード例 #1
0
        public void TestGetBooksFromAuthor()
        {
            IBookServices   bsi = new BookServicesImplementation();
            IAuthorServices asi = new AuthorServicesImplementation();

            var author = asi.GetAuthorByName("Bert Bates");
            var books  = bsi.GetBooksFromAuthor(author);

            Assert.AreEqual(1, books.Count);
        }
コード例 #2
0
 public void TestAuthorHasDataServiceWithArgument()
 {
     authorServices = new AuthorServicesImplementation(authorDataServices);
     Assert.IsTrue(authorServices != null);
 }
コード例 #3
0
 public void TestAuthorHasDataServiceWithNoArgument()
 {
     authorServices = new AuthorServicesImplementation();
 }
コード例 #4
0
 public void SetUp()
 {
     authorDataServices = MockRepository.GenerateMock <IAuthorDataService>();
     authorServices     = new AuthorServicesImplementation(authorDataServices);
 }