-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(serviceTypeId): rename Consultance_Service (#235)
Reviewed-By: Phil Schneider <[email protected]> Refs: CPLP-2745
- Loading branch information
Showing
9 changed files
with
7,326 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7,262 changes: 7,262 additions & 0 deletions
7,262
...ackend.Migrations/Migrations/20230825045227_CPLP-2745-RenameServiceTypeIdEnum.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
...d/PortalBackend.Migrations/Migrations/20230825045227_CPLP-2745-RenameServiceTypeIdEnum.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2021, 2023 BMW Group AG | ||
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations.Migrations | ||
{ | ||
public partial class CPLP2745RenameServiceTypeIdEnum : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.UpdateData( | ||
schema: "portal", | ||
table: "service_types", | ||
keyColumn: "id", | ||
keyValue: 2, | ||
column: "label", | ||
value: "CONSULTANCY_SERVICE"); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.UpdateData( | ||
schema: "portal", | ||
table: "service_types", | ||
keyColumn: "id", | ||
keyValue: 2, | ||
column: "label", | ||
value: "CONSULTANCE_SERVICE"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,7 +199,7 @@ public async Task GetServiceTypeData_ReturnExpectedResult() | |
// Arrange | ||
var data = _fixture.Build<ServiceTypeData>() | ||
.With(x => x.ServiceTypeId, 1) | ||
.With(x => x.Name, ServiceTypeId.CONSULTANCE_SERVICE.ToString()) | ||
.With(x => x.Name, ServiceTypeId.CONSULTANCY_SERVICE.ToString()) | ||
.CreateMany() | ||
.ToAsyncEnumerable(); | ||
|
||
|
@@ -215,7 +215,7 @@ public async Task GetServiceTypeData_ReturnExpectedResult() | |
.MustHaveHappenedOnceExactly(); | ||
result.Should().BeOfType<List<ServiceTypeData>>(); | ||
result.FirstOrDefault()!.ServiceTypeId.Should().Be(1); | ||
result.FirstOrDefault()!.Name.Should().Be(ServiceTypeId.CONSULTANCE_SERVICE.ToString()); | ||
result.FirstOrDefault()!.Name.Should().Be(ServiceTypeId.CONSULTANCY_SERVICE.ToString()); | ||
} | ||
|
||
[Fact] | ||
|
@@ -249,7 +249,7 @@ public async Task GetServiceTypeDataAsync_ReturnsExpected() | |
.With(x => x.Title, "test title") | ||
.With(x => x.ContactEmail, "[email protected]") | ||
.With(x => x.UseCase, (IEnumerable<AppUseCaseData>?)null) | ||
.With(x => x.ServiceTypeIds, new[] { ServiceTypeId.DATASPACE_SERVICE, ServiceTypeId.CONSULTANCE_SERVICE }) | ||
.With(x => x.ServiceTypeIds, new[] { ServiceTypeId.DATASPACE_SERVICE, ServiceTypeId.CONSULTANCY_SERVICE }) | ||
.Create(); | ||
|
||
A.CallTo(() => _offerService.GetProviderOfferDetailsForStatusAsync(serviceId, _identity.CompanyId, OfferTypeId.SERVICE)) | ||
|
@@ -444,7 +444,7 @@ public async Task UpdateServiceAsync_WithValidData_ReturnsExpected() | |
}, | ||
new List<ServiceTypeId> | ||
{ | ||
ServiceTypeId.CONSULTANCE_SERVICE | ||
ServiceTypeId.CONSULTANCY_SERVICE | ||
}, | ||
"43", | ||
"[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters