Esempio 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);
        }
Esempio n. 2
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"));
        }