Beispiel #1
0
        public void MapBOToModel()
        {
            var mapper = new BOLCompositePrimaryKeyMapper();
            BOCompositePrimaryKey bo = new BOCompositePrimaryKey();

            bo.SetProperties(1, 1);
            ApiCompositePrimaryKeyResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.Id2.Should().Be(1);
        }
Beispiel #2
0
        public void MapBOToEF()
        {
            var mapper = new DALCompositePrimaryKeyMapper();
            var bo     = new BOCompositePrimaryKey();

            bo.SetProperties(1, 1);

            CompositePrimaryKey response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Id2.Should().Be(1);
        }
Beispiel #3
0
        public void MapBOToModelList()
        {
            var mapper = new BOLCompositePrimaryKeyMapper();
            BOCompositePrimaryKey bo = new BOCompositePrimaryKey();

            bo.SetProperties(1, 1);
            List <ApiCompositePrimaryKeyResponseModel> response = mapper.MapBOToModel(new List <BOCompositePrimaryKey>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }