Exemple #1
0
        public void MapBOToModelList()
        {
            var mapper = new BOLEmployeePayHistoryMapper();
            BOEmployeePayHistory bo = new BOEmployeePayHistory();

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

            response.Count.Should().Be(1);
        }
Exemple #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLEmployeePayHistoryMapper();
            ApiEmployeePayHistoryRequestModel model = new ApiEmployeePayHistoryRequestModel();

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

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PayFrequency.Should().Be(1);
            response.Rate.Should().Be(1m);
            response.RateChangeDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Exemple #3
0
        public void MapBOToModel()
        {
            var mapper = new BOLEmployeePayHistoryMapper();
            BOEmployeePayHistory bo = new BOEmployeePayHistory();

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

            response.BusinessEntityID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PayFrequency.Should().Be(1);
            response.Rate.Should().Be(1m);
            response.RateChangeDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Exemple #4
0
        public void MapEFToBO()
        {
            var mapper = new DALEmployeePayHistoryMapper();
            EmployeePayHistory entity = new EmployeePayHistory();

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

            BOEmployeePayHistory response = mapper.MapEFToBO(entity);

            response.BusinessEntityID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PayFrequency.Should().Be(1);
            response.Rate.Should().Be(1m);
            response.RateChangeDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }