Example #1
0
        public virtual ApiTenantResponseModel MapBOToModel(
            BOTenant boTenant)
        {
            var model = new ApiTenantResponseModel();

            model.SetProperties(boTenant.Id, boTenant.DataVersion, boTenant.JSON, boTenant.Name, boTenant.ProjectIds, boTenant.TenantTags);

            return(model);
        }
        public virtual ApiTenantResponseModel MapBOToModel(
            BOTenant boTenant)
        {
            var model = new ApiTenantResponseModel();

            model.SetProperties(boTenant.Id, boTenant.Name);

            return(model);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiTenantModelMapper();
            var model  = new ApiTenantResponseModel();

            model.SetProperties(1, "A");
            ApiTenantRequestModel response = mapper.MapResponseToRequest(model);

            response.Name.Should().Be("A");
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiTenantModelMapper();
            var model  = new ApiTenantResponseModel();

            model.SetProperties("A", BitConverter.GetBytes(1), "A", "A", "A", "A");
            ApiTenantRequestModel response = mapper.MapResponseToRequest(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");
        }