public virtual async void TestDelete()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);
            var        client     = new ApiClient(testServer.CreateClient());

            client.SetBearerToken(JWTTestHelper.GenerateBearerToken());
            ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext;

            IFollowerService service = testServer.Host.Services.GetService(typeof(IFollowerService)) as IFollowerService;
            var model = new ApiFollowerServerRequestModel();

            model.SetProperties("B", DateTime.Parse("1/1/1988 12:00:00 AM"), 1, 1, "B", "B");
            CreateResponse <ApiFollowerServerResponseModel> createdResponse = await service.Create(model);

            createdResponse.Success.Should().BeTrue();

            ActionResponse deleteResult = await client.FollowerDeleteAsync(2);

            deleteResult.Success.Should().BeTrue();
            ApiFollowerServerResponseModel verifyResponse = await service.Get(2);

            verifyResponse.Should().BeNull();
        }
        public async void Get_ShouldReturnNullBecauseRecordNotFound()
        {
            var mock = new ServiceMockFacade <IFollowerService, IFollowerRepository>();

            mock.RepositoryMock.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult <Follower>(null));
            var service = new FollowerService(mock.LoggerMock.Object,
                                              mock.MediatorMock.Object,
                                              mock.RepositoryMock.Object,
                                              mock.ModelValidatorMockFactory.FollowerModelValidatorMock.Object,
                                              mock.DALMapperMockFactory.DALFollowerMapperMock);

            ApiFollowerServerResponseModel response = await service.Get(default(int));

            response.Should().BeNull();
            mock.RepositoryMock.Verify(x => x.Get(It.IsAny <int>()));
        }
        public void MapServerRequestToResponse()
        {
            var mapper = new ApiFollowerServerModelMapper();
            var model  = new ApiFollowerServerRequestModel();

            model.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, "A", "A");
            ApiFollowerServerResponseModel response = mapper.MapServerRequestToResponse(1, model);

            response.Should().NotBeNull();
            response.Blocked.Should().Be("A");
            response.DateFollowed.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.FollowedUserId.Should().Be(1);
            response.FollowingUserId.Should().Be(1);
            response.FollowRequestStatu.Should().Be("A");
            response.Muted.Should().Be("A");
        }