Exemple #1
0
        public virtual ApiTeamResponseModel MapBOToModel(
            BOTeam boTeam)
        {
            var model = new ApiTeamResponseModel();

            model.SetProperties(boTeam.Id, boTeam.EnvironmentIds, boTeam.JSON, boTeam.MemberUserIds, boTeam.Name, boTeam.ProjectGroupIds, boTeam.ProjectIds, boTeam.TenantIds, boTeam.TenantTags);

            return(model);
        }
        public virtual ApiTeamResponseModel MapBOToModel(
            BOTeam boTeam)
        {
            var model = new ApiTeamResponseModel();

            model.SetProperties(boTeam.Id, boTeam.Name, boTeam.OrganizationId);

            return(model);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiTeamModelMapper();
            var model  = new ApiTeamResponseModel();

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

            response.Name.Should().Be("A");
            response.OrganizationId.Should().Be(1);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiTeamModelMapper();
            var model  = new ApiTeamResponseModel();

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

            response.EnvironmentIds.Should().Be("A");
            response.JSON.Should().Be("A");
            response.MemberUserIds.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProjectGroupIds.Should().Be("A");
            response.ProjectIds.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }