public void GetMarkWithMock()
        {
            var repository = Mock.Create<DbStudentRepository>();
            bool itemIsAdded = false;

            var student = new Student()
                .AddFirstName("I")
                .AddLastName("Mock")
                .AddId(0).AddMarks("math", 5.5, 3) ;

            Mock.Arrange(() => repository.Add(Arg.IsAny<Student>()))
                .DoInstead(() => { itemIsAdded = true; })
                .Returns(student);

            var controller = new StudentsController(repository);
            SetupController(controller);

            controller.Post(student);

            Assert.IsTrue(itemIsAdded == true);
        }
        public void PostStudent()
        {
            var repository = new FakeStudentRepository(new DbContext("JustMock sucks"));

            var student = new Student();

            var controller = new StudentsController(repository);
            SetupController(controller);

            controller.Post(student);

            Assert.IsTrue(repository.students.Count == 1);
        }