示例#1
0
        public void Delete_SaveAndThenDeleteAWikiPage_ShouldBeDoneWithoutErrors()
        {
            WikiAccount account     = new WikiAccount();
            Wikipage    pageToStore = new Wikipage(account);

            pageToStore.WikiPageName    = "delete.php";
            pageToStore.WikiPageContent = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore ...";

            IWikiRepository repository     = WikiRepositoryFactory.CreateRepository(WikiRepositoryType.FileRepository);
            string          pageIdentifier = repository.Store <Wikipage>(pageToStore);

            repository.Delete(pageIdentifier);
        }
示例#2
0
        public void GetIdenitfiers_NoIdentifiersAtAll_WikiRepositoryExceptionIsThrown()
        {
            IWikiRepository repository = WikiRepositoryFactory.CreateRepository(WikiRepositoryType.FileRepository);

            //Possible that there are already wiki objects loaded, because of the other tests.
            //If not the exception is already thrown here.
            foreach (string identifier in repository.GetIdentifiers())
            {
                repository.Delete(identifier);
            }

            //Now it should definitly throw the exception
            repository.GetIdentifiers();
        }
示例#3
0
        public void Delete_TryToDeleteAWikiObjectWhichDoesNotExists_AWikiRepositoryExceptionShouldBeThrown()
        {
            IWikiRepository repository = WikiRepositoryFactory.CreateRepository(WikiRepositoryType.FileRepository);

            repository.Delete("foo_bar_li");
        }