Ejemplo n.º 1
0
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiAdminModelMapper();
            var model  = new ApiAdminClientResponseModel();

            model.SetProperties(1, "A", "A", "A", "A", "A", "A");
            ApiAdminClientRequestModel response = mapper.MapClientResponseToRequest(model);

            response.Should().NotBeNull();
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.Password.Should().Be("A");
            response.Phone.Should().Be("A");
            response.Username.Should().Be("A");
        }
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiAdminModelMapper();
            var model  = new ApiAdminClientResponseModel();

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

            response.Should().NotBeNull();
            response.Birthday.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.Phone.Should().Be("A");
            response.UserId.Should().Be(1);
        }