Ejemplo n.º 1
0
        public void MapBOToModelList()
        {
            var mapper = new BOLEmployeeDepartmentHistoryMapper();
            BOEmployeeDepartmentHistory bo = new BOEmployeeDepartmentHistory();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM"));
            List <ApiEmployeeDepartmentHistoryResponseModel> response = mapper.MapBOToModel(new List <BOEmployeeDepartmentHistory>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLEmployeeDepartmentHistoryMapper();
            ApiEmployeeDepartmentHistoryRequestModel model = new ApiEmployeeDepartmentHistoryRequestModel();

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

            response.DepartmentID.Should().Be(1);
            response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ShiftID.Should().Be(1);
            response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Ejemplo n.º 3
0
        public void MapBOToModel()
        {
            var mapper = new BOLEmployeeDepartmentHistoryMapper();
            BOEmployeeDepartmentHistory bo = new BOEmployeeDepartmentHistory();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM"));
            ApiEmployeeDepartmentHistoryResponseModel response = mapper.MapBOToModel(bo);

            response.BusinessEntityID.Should().Be(1);
            response.DepartmentID.Should().Be(1);
            response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ShiftID.Should().Be(1);
            response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
        public void MapEFToBO()
        {
            var mapper = new DALEmployeeDepartmentHistoryMapper();
            EmployeeDepartmentHistory entity = new EmployeeDepartmentHistory();

            entity.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM"));

            BOEmployeeDepartmentHistory response = mapper.MapEFToBO(entity);

            response.BusinessEntityID.Should().Be(1);
            response.DepartmentID.Should().Be(1);
            response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ShiftID.Should().Be(1);
            response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }