예제 #1
0
        public static ContentPersister SetupFakePersister(out FakeRepository <ContentItem> repository, out FakeRepository <ContentDetail> linkRepository)
        {
            repository     = new Fakes.FakeRepository <ContentItem>();
            linkRepository = new Fakes.FakeRepository <ContentDetail>();

            return(new ContentPersister(repository, linkRepository));
        }
예제 #2
0
        public static ContentPersister SetupFakePersister(out FakeRepository <ContentItem> repository, out FakeRepository <ContentDetail> linkRepository, out IItemFinder finder)
        {
            repository     = new Fakes.FakeRepository <ContentItem>();
            linkRepository = new Fakes.FakeRepository <ContentDetail>();
            finder         = MockRepository.GenerateStub <N2.Persistence.Finder.IItemFinder>();

            return(new ContentPersister(repository, linkRepository, finder));
        }
예제 #3
0
 public FakeVersionManager(FakeRepository <ContentItem> itemRepository, StateChanger stateChanger)
     : base(itemRepository, null, stateChanger, new N2.Configuration.EditSection())
 {
     this.itemRepository = itemRepository;
 }
 public FakeVersionManager(FakeContentItemRepository itemRepository, StateChanger stateChanger, params Type[] definitionTypes)
     : base(TestSupport.CreateVersionRepository(definitionTypes), itemRepository, stateChanger, new N2.Configuration.EditSection())
 {
     this.itemRepository = itemRepository;
 }