Beispiel #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLTenantMapper();
            ApiTenantRequestModel model = new ApiTenantRequestModel();

            model.SetProperties("A");
            BOTenant response = mapper.MapModelToBO(1, model);

            response.Name.Should().Be("A");
        }
Beispiel #2
0
        public void MapBOToModel()
        {
            var      mapper = new BOLTenantMapper();
            BOTenant bo     = new BOTenant();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Beispiel #3
0
        public void MapEFToBO()
        {
            var    mapper = new DALTenantMapper();
            Tenant entity = new Tenant();

            entity.SetProperties(1, "A");

            BOTenant response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Beispiel #4
0
        public void MapBOToEF()
        {
            var mapper = new DALTenantMapper();
            var bo     = new BOTenant();

            bo.SetProperties(1, "A");

            Tenant response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Beispiel #5
0
        public void MapBOToModelList()
        {
            var      mapper = new BOLTenantMapper();
            BOTenant bo     = new BOTenant();

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

            response.Count.Should().Be(1);
        }
        public void MapModelToBO()
        {
            var mapper = new BOLTenantMapper();
            ApiTenantRequestModel model = new ApiTenantRequestModel();

            model.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", "A");
            BOTenant response = mapper.MapModelToBO("A", model);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProjectIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }
        public void MapBOToModel()
        {
            var      mapper = new BOLTenantMapper();
            BOTenant bo     = new BOTenant();

            bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A", "A", "A");
            ApiTenantResponseModel response = mapper.MapBOToModel(bo);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProjectIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }
Beispiel #8
0
        public void MapEFToBO()
        {
            var    mapper = new DALTenantMapper();
            Tenant entity = new Tenant();

            entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", "A", "A");

            BOTenant response = mapper.MapEFToBO(entity);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProjectIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }