public void InitTest()
        {
            this.mock = new MockContainer();
            this.mock.PrepareMocks();
            this.fakePictures = this.mock.PictureRepositoryMock.Object.All();
            this.mockContext = new Mock<IPhotoContestData>();
            this.mockContext.Setup(c => c.Pictures.All())
                .Returns(this.fakePictures);

            this.pictureController = new PicturesController(this.mockContext.Object);
        }
        public void InitTest()
        {
            this.mock = new MockContainer();
            this.mock.PrepareMocks();

            this.fakeContests = this.mock.ContestsRepositoryMock.Object.All();
            this.fakeMaintanceLogs = this.mock.MaintanceLogRepositoryMock.Object.All();
            this.mockContext = new Mock<IPhotoContestData>();
            this.mockContext.Setup(c => c.Contests.All())
                .Returns(this.fakeContests);

            this.mockContext.Setup(c => c.MaintanceLogs.All())
                .Returns(this.fakeMaintanceLogs);

            this.homeController = new HomeController(this.mockContext.Object);
        }
        public void InitTest()
        {
            this.mock = new MockContainer();
            this.mock.PrepareMocks();
            this.fakeContests = this.mock.ContestsRepositoryMock.Object.All();
            this.fakePictures = this.mock.PictureRepositoryMock.Object.All();
            this.fakeMaintanceLogs = this.mock.MaintanceLogRepositoryMock.Object.All();
            this.fakeUsers = this.mock.UsersRepositoryMock.Object.All();
            this.user = this.fakeUsers.FirstOrDefault();
            this.mockContext = new Mock<IPhotoContestData>();
            this.mockContext.Setup(c => c.Contests.All())
                .Returns(this.fakeContests);
            this.mockContext.Setup(c => c.Pictures.All())
                .Returns(this.fakePictures);
            this.mockContext.Setup(c => c.MaintanceLogs.All())
                .Returns(this.fakeMaintanceLogs);
            this.mockContext.Setup(c => c.Users.All())
                .Returns(this.fakeUsers);
            this.mockContext.Setup(c => c.Users.Find(It.IsAny<string>()))
                .Returns((string id) =>
                {
                    return this.fakeUsers.FirstOrDefault(n => n.Id == id);
                });
            this.mockContext.Setup(c => c.Pictures.Add(It.IsAny<Picture>()))
                .Callback((Picture picture) =>
                {
                    this.mock.PictureRepositoryMock.Object.Add(picture);
                });

            this.meController = new MeController(this.mockContext.Object);
        }