Skip to content

Commit 2f7d21b

Browse files
committed
chore: rename backbone attrubte tag
1 parent c30dd02 commit 2f7d21b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/consumption/src/modules/attributes/AttributesController.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { IdentityAttributeQueryTranslator, RelationshipAttributeQueryTranslator,
4646

4747
export class AttributesController extends ConsumptionBaseController {
4848
private attributes: SynchronizedCollection;
49-
private tagsClient: AttributeTagClient;
49+
private attributeTagClient: AttributeTagClient;
5050

5151
public constructor(
5252
parent: ConsumptionController,
@@ -61,7 +61,7 @@ export class AttributesController extends ConsumptionBaseController {
6161
await super.init();
6262

6363
this.attributes = await this.parent.accountController.getSynchronizedCollection("Attributes");
64-
this.tagsClient = new AttributeTagClient(this.parent.transport.config, this.parent.accountController.authenticator, this.parent.transport.correlator);
64+
this.attributeTagClient = new AttributeTagClient(this.parent.transport.config, this.parent.accountController.authenticator, this.parent.transport.correlator);
6565

6666
return this;
6767
}
@@ -1295,7 +1295,7 @@ export class AttributesController extends ConsumptionBaseController {
12951295
}
12961296

12971297
public async getAttributeTagCollection(): Promise<AttributeTagCollection> {
1298-
const backboneTagList = (await this.tagsClient.getBackboneAttributeTagCollection()).value;
1298+
const backboneTagList = (await this.attributeTagClient.getBackboneAttributeTagCollection()).value;
12991299
return AttributeTagCollection.fromAny(backboneTagList);
13001300
}
13011301
}

packages/consumption/test/modules/attributes/AttributeTagCollection.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IDatabaseConnection } from "@js-soft/docdb-access-abstractions";
2-
import { AccountController, ClientResult, TagClient, Transport } from "@nmshd/transport";
2+
import { AccountController, AttributeTagClient, ClientResult, Transport } from "@nmshd/transport";
33
import { spy, when } from "ts-mockito";
44
import { ConsumptionController } from "../../../src";
55
import { TestUtil } from "../../core/TestUtil";
@@ -12,7 +12,7 @@ describe("AttributeTagCollection", function () {
1212
let consumptionController: ConsumptionController;
1313
let accountController: AccountController;
1414

15-
let mockedClient: TagClient;
15+
let mockedClient: AttributeTagClient;
1616

1717
/* eslint-disable @typescript-eslint/naming-convention */
1818
const mockTags = {
@@ -59,7 +59,7 @@ describe("AttributeTagCollection", function () {
5959
const accounts = await TestUtil.provideAccounts(transport, 1);
6060
({ consumptionController, accountController } = accounts[0]);
6161

62-
const client = consumptionController.attributes["tagsClient"];
62+
const client = consumptionController.attributes["attributeTagClient"];
6363
mockedClient = spy(client);
6464
});
6565

@@ -70,7 +70,7 @@ describe("AttributeTagCollection", function () {
7070
});
7171

7272
test("should receive the legal tags from the Backbone", async function () {
73-
when(mockedClient.getTags()).thenResolve(ClientResult.ok(mockTags));
73+
when(mockedClient.getBackboneAttributeTagCollection()).thenResolve(ClientResult.ok(mockTags));
7474
const tags = await consumptionController.attributes.getAttributeTagCollection();
7575

7676
expect(tags.toJSON()).toStrictEqualExcluding(mockTags, "@type");

packages/runtime/test/consumption/attributeTagCollection.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { ClientResult, DefinedTagClient } from "@nmshd/transport";
1+
import { AttributeTagClient, ClientResult } from "@nmshd/transport";
22
import { reset, spy, when } from "ts-mockito";
33
import { RuntimeServiceProvider, TestRuntimeServices } from "../lib";
44

55
const serviceProvider = new RuntimeServiceProvider();
66
let runtimeService: TestRuntimeServices;
77

8-
let mockedRestClient: DefinedTagClient;
8+
let mockedRestClient: AttributeTagClient;
99

1010
beforeAll(async () => {
1111
runtimeService = (await serviceProvider.launch(1))[0];
12-
const client = runtimeService.consumption.attributes["getAttributeTagCollectionUseCase"]["attributesController"]["tagsClient"] as DefinedTagClient;
12+
const client = runtimeService.consumption.attributes["getAttributeTagCollectionUseCase"]["attributesController"]["attributeTagClient"] as AttributeTagClient;
1313
mockedRestClient = spy(client);
1414
}, 30000);
1515

@@ -57,7 +57,7 @@ describe("get attributeTagCollection", function () {
5757
/* eslint-enable @typescript-eslint/naming-convention */
5858

5959
test("should receive the legal tags from the Backbone", async function () {
60-
when(mockedRestClient.getBackboneDefinedTags()).thenResolve(ClientResult.ok(mockTags));
60+
when(mockedRestClient.getBackboneAttributeTagCollection()).thenResolve(ClientResult.ok(mockTags));
6161
const tags = await runtimeService.consumption.attributes.getAttributeTagCollection();
6262

6363
expect(tags.value).toStrictEqual(mockTags);

0 commit comments

Comments
 (0)