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() };
 }
 private BlogCommentRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     return new BlogCommentRepository { DataContext = dc, DataContextFactory = dcf };
 }
 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 };
 }
Exemple #4
0
 public void Init()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     repository = new UserRepository { DataContext = dc, DataContextFactory = dcf };
 }
 private FamilyRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     return new FamilyRepository { DataContext = dc, DataContextFactory = dcf };
 }