示例#1
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLErrorLogMapper();
            BOErrorLog bo     = new BOErrorLog();

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

            response.Count.Should().Be(1);
        }
示例#2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLErrorLogMapper();
            BOErrorLog bo     = new BOErrorLog();

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

            response.ErrorLine.Should().Be(1);
            response.ErrorLogID.Should().Be(1);
            response.ErrorMessage.Should().Be("A");
            response.ErrorNumber.Should().Be(1);
            response.ErrorProcedure.Should().Be("A");
            response.ErrorSeverity.Should().Be(1);
            response.ErrorState.Should().Be(1);
            response.ErrorTime.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.UserName.Should().Be("A");
        }