public async Task Handle_DefaultPointsRedeemPlansObjectUpdated_UpdatesAreReflectedInDb()
        {
            // Arrange
            var pointsRedeemPlan = await CreatePointsRedeemPlanUsingAutoFixture(1);

            // update properties
            var defaultPointsRedeemPlans = pointsRedeemPlan.DefaultPointsRedeemPlans.First();

            defaultPointsRedeemPlans.PointsRedeemPlanId = _fixture.Create <int>();
            defaultPointsRedeemPlans.Module             = _fixture.Create <ModuleTypes>();

            // AutoMapper setup
            _mapperMock.Setup(m => m.Map(It.IsAny <UpdatePointsRedeemPlanCommand>(), It.IsAny <PointsRedeemPlan>())).Returns(pointsRedeemPlan);

            // creating System Under Test
            var sut = new UpdatePointsRedeemPlanCommandHandler(_context, _mapperMock.Object);

            // Act
            await sut.Handle(new UpdatePointsRedeemPlanCommand(), CancellationToken.None);

            // Assert
            var dbDefaultPointsRedeemPlans = _context.DefaultPointsRedeemPlans.First();

            dbDefaultPointsRedeemPlans.PointsRedeemPlanId.ShouldBe(defaultPointsRedeemPlans.PointsRedeemPlanId);
            dbDefaultPointsRedeemPlans.Module.ShouldBe(defaultPointsRedeemPlans.Module);
        }
        public async Task Handle_PointsRedeemPlanObjectSimplePropertiesUpdated_UpdatesAreReflectedInDb()
        {
            // Arrange
            var pointsRedeemPlan = await CreatePointsRedeemPlanUsingAutoFixture(0);

            // update properties
            pointsRedeemPlan.PlanDate = _fixture.Create <DateTime>();
            pointsRedeemPlan.Points   = _fixture.Create <int>();

            // AutoMapper setup
            _mapperMock.Setup(m => m.Map(It.IsAny <UpdatePointsRedeemPlanCommand>(), It.IsAny <PointsRedeemPlan>())).Returns(pointsRedeemPlan);

            // creating System Under Test
            var sut = new UpdatePointsRedeemPlanCommandHandler(_context, _mapperMock.Object);

            // Act
            await sut.Handle(new UpdatePointsRedeemPlanCommand(), CancellationToken.None);

            // Assert
            var dbPointsRedeemPlan = _context.PointsRedeemPlans.First();

            dbPointsRedeemPlan.PlanDate.ShouldBe(pointsRedeemPlan.PlanDate);
            dbPointsRedeemPlan.Points.ShouldBe(pointsRedeemPlan.Points);
        }