コード例 #1
0
        public void MapBOToModel()
        {
            var mapper = new BOLCountryRequirementMapper();
            BOCountryRequirement bo = new BOCountryRequirement();

            bo.SetProperties(1, 1, "A");
            ApiCountryRequirementResponseModel response = mapper.MapBOToModel(bo);

            response.CountryId.Should().Be(1);
            response.Detail.Should().Be("A");
            response.Id.Should().Be(1);
        }
コード例 #2
0
        public void MapBOToModelList()
        {
            var mapper = new BOLCountryRequirementMapper();
            BOCountryRequirement bo = new BOCountryRequirement();

            bo.SetProperties(1, 1, "A");
            List <ApiCountryRequirementResponseModel> response = mapper.MapBOToModel(new List <BOCountryRequirement>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
コード例 #3
0
        public void MapBOToEF()
        {
            var mapper = new DALCountryRequirementMapper();
            var bo     = new BOCountryRequirement();

            bo.SetProperties(1, 1, "A");

            CountryRequirement response = mapper.MapBOToEF(bo);

            response.CountryId.Should().Be(1);
            response.Detail.Should().Be("A");
            response.Id.Should().Be(1);
        }