Ejemplo n.º 1
0
        public void Init()
        {
            var serviceLocator = new RepositoryServiceLocator();
            _postRepository = serviceLocator.Locate<IPostRepository>();
            _userRepository = serviceLocator.Locate<IUserRepository>();
            _blogRepository = serviceLocator.Locate<IBlogRepository>();

            // add the needed user
            _neededUser = new User
            {
                DisplayName = "Galilyou",
                Email = "*****@*****.**",
                Url = "http://galilyou.blogspot.com",
                SignUpDate = DateTime.Now
            };

            _userRepository.Add(_neededUser);

            // add the needed blog
            _neededBlog = new Blog {Name = "Programming for Cowards", Author = _neededUser, CreatedDate = DateTime.Now, LastModifiedDate = DateTime.Now};
            _blogRepository.Add(_neededBlog);
        }
Ejemplo n.º 2
0
        public UserValidator()
        {
            var repositoryServiceLocator = new RepositoryServiceLocator();

            _userRepository = repositoryServiceLocator.GetRepositoryService <IUserRepository>();
        }
Ejemplo n.º 3
0
 public void SetupFixture()
 {
     _serviceLocator = new RepositoryServiceLocator();
 }
Ejemplo n.º 4
0
 public void Setup()
 {
     var kernel = new RepositoryServiceLocator();
     _tagRepository = kernel.Locate<ITagRepository>();
 }
Ejemplo n.º 5
0
        public RatingValidator()
        {
            var repositoryServiceLocator = new RepositoryServiceLocator();

            _ratingRepository = repositoryServiceLocator.GetRepositoryService <IRatingRepository>();
        }