public void AddSimpleStudentTest()
        {
            bool isItemAdded = false;
            var repository = Mock.Create<IRepository<Student>>();

            var studentModel = new StudentModel()
            {
                FirstName = "Petko"
            };

            var studentEntity = new Student()
            {
                StudentId = 1,
                FirstName = studentModel.FirstName
            };

            Mock.Arrange(() => repository.Add(Arg.IsAny<Student>()))
                .DoInstead(() => isItemAdded = true);
                //.Returns(studentEntity);

            var controller = new StudentsController(repository);
            SetupController(controller);
            controller.PostStudent(studentModel);

            Assert.IsTrue(isItemAdded);
        }
        public void UpdateStudentTest()
        {
            bool isItemUpdated = false;
            var repository = Mock.Create<IRepository<Student>>();

            var studentModel = new StudentModel()
            {
                FirstName = "Petko"
            };
            var studentEntity = new Student()
            {
                StudentId = 1,
                FirstName = studentModel.FirstName
            };

            var controller = new StudentsController(repository);
            SetupController(controller);
            controller.PostStudent(studentModel);

            Mock.Arrange(() => repository.Update(Arg.IsAny<int>(), Arg.IsAny<Student>()))
              .DoInstead(() => isItemUpdated = true)
              .Returns(studentEntity);

            var newStudent = new Student()
            {
                StudentId = 1,
                FirstName = "New first name"
            };

            controller.Put(1, newStudent);

            Assert.IsTrue(isItemUpdated);
        }