Ejemplo n.º 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLEmployeeMapper();
            ApiEmployeeRequestModel model = new ApiEmployeeRequestModel();

            model.SetProperties("A", true, true, "A");
            BOEmployee response = mapper.MapModelToBO(1, model);

            response.FirstName.Should().Be("A");
            response.IsSalesPerson.Should().Be(true);
            response.IsShipper.Should().Be(true);
            response.LastName.Should().Be("A");
        }
Ejemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLEmployeeMapper();
            ApiEmployeeRequestModel model = new ApiEmployeeRequestModel();

            model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), true, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), true, 1, 1);
            BOEmployee response = mapper.MapModelToBO(1, model);

            response.BirthDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.CurrentFlag.Should().Be(true);
            response.Gender.Should().Be("A");
            response.HireDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.JobTitle.Should().Be("A");
            response.LoginID.Should().Be("A");
            response.MaritalStatu.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.NationalIDNumber.Should().Be("A");
            response.OrganizationLevel.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.SalariedFlag.Should().Be(true);
            response.SickLeaveHour.Should().Be(1);
            response.VacationHour.Should().Be(1);
        }