Esempio n. 1
0
 private BlogRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     var titleCleaner = MockRepository.GenerateMock<ITitleCleaner>();
     return new BlogRepository { DataContext = dc, DataContextFactory = dcf, TitleCleaner = titleCleaner, Cache = new InMemoryCache() };
 }
Esempio n. 2
0
 private BlogCommentRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     return new BlogCommentRepository { DataContext = dc, DataContextFactory = dcf };
 }
Esempio n. 3
0
 private BlogRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     var titleCleaner = MockRepository.GenerateMock<ITitleCleaner>();
     var blogCommentRepository = MockRepository.GenerateMock<IModelLister<IBlogComment, int>>();
     return new BlogRepository { DataContext = dc, DataContextFactory = dcf, TitleCleaner = titleCleaner, BlogCommentRepository = blogCommentRepository };
 }
Esempio n. 4
0
 public void Init()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     repository = new UserRepository { DataContext = dc, DataContextFactory = dcf };
 }
Esempio n. 5
0
 private FamilyRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     return new FamilyRepository { DataContext = dc, DataContextFactory = dcf };
 }