public void DeletedAssignmentShoundNotExistInDatabase()
        {
            //Arrange
            NewAssignmentVm assignmentToAdd = new NewAssignmentVm()
            {
                Id   = 1,
                Name = "test"
            };

            var options = new DbContextOptionsBuilder <Context>()
                          .UseInMemoryDatabase("UsersDirectoryMVC")
                          .Options;

            var config = new MapperConfiguration(c =>
            {
                c.AddProfile(new MappingProfile());
            });
            var mapper = config.CreateMapper();

            using (var context = new Context(options))
            {
                //Act
                var assignmentService = new AssignmentService(mapper, new AssignmentRepository(context));
                var result            = assignmentService.AddAssignment(assignmentToAdd);
                assignmentService.DeleteAssignment(1);
                var deletedAssignment = assignmentService.GetAssignmentDetails(1);

                //Assert
                deletedAssignment.Should().BeNull();
            }
        }
        public void CheckAssignmentDetailsAreEqualLikeModel()
        {
            //Arrange
            NewAssignmentVm assignmentToAdd = new NewAssignmentVm()
            {
                Id   = 1,
                Name = "test"
            };

            var config = new MapperConfiguration(c =>
            {
                c.AddProfile(new MappingProfile());
            });
            var mapper = config.CreateMapper();

            var options = new DbContextOptionsBuilder <Context>()
                          .UseInMemoryDatabase("UsersDirectoryMVC")
                          .Options;


            using (var context = new Context(options))
            {
                //Act
                var assignmentService = new AssignmentService(mapper, new AssignmentRepository(context));
                var result            = assignmentService.AddAssignment(assignmentToAdd);
                var assignemntDetails = assignmentService.GetAssignmentDetails(1);

                //Assert
                assignemntDetails.Should().NotBeNull();
                assignemntDetails.Should().Equals(assignmentToAdd);
                context.Assignments.FirstOrDefaultAsync(e => e.Id == assignemntDetails.Id).Should().NotBeNull();
            }
        }