Beispiel #1
0
 public MetaWeblog(IRepository repository, IUrlContext urlContext, IAuthenticationService authenticationService)
 {
     _repository = repository;
     _urlContext = urlContext;
     _authenticationService = authenticationService;
     _settings = BlogSettings.Get(_repository);
 }
Beispiel #2
0
        public virtual void setup()
        {
            var mongoRepository = new MongoRepository("blogspecs");
            mongoRepository.DeleteCollection<BlogSettings>();
            mongoRepository.DeleteCollection<Post>();

            _repository = mongoRepository;

            _blog = new BlogSettings
            {
                VirtualMediaPath = ""
            };
            _repository.Save(_blog);

            _fakePost = Post.CreatePost("Hello world", "", "BjartN", null);

            _repository.Save(_fakePost);

            _api = new  Infrastructure.MetaWeblogApi.MetaWeblog(_repository, new FakeUrlContext(),new FakeAuthenticationService());
        }