From 0fa3e11d1cfdae42fce56a224196cef99d5a75df Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Sat, 14 May 2022 21:17:17 +0100 Subject: [PATCH] rename example object --- .../mediatorMap/impl/mediatorMapPreload.test.ts | 10 ++++------ ...splayObjectMediator.ts => ExampleSpriteMediator.ts} | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) rename packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/{ExampleDisplayObjectMediator.ts => ExampleSpriteMediator.ts} (86%) diff --git a/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/impl/mediatorMapPreload.test.ts b/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/impl/mediatorMapPreload.test.ts index a7594200..901c02a9 100644 --- a/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/impl/mediatorMapPreload.test.ts +++ b/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/impl/mediatorMapPreload.test.ts @@ -11,9 +11,9 @@ import { Container, Sprite, Text } from "pixi.js"; import { MediatorMap } from "../../../../../../src/robotlegs/bender/extensions/mediatorMap/impl/MediatorMap"; import "../../../../../entry"; import { Alpha50PercentHook } from "../support/Alpha50PercentHook"; -import { ExampleDisplayObjectMediator } from "../support/ExampleDisplayObjectMediator"; import { ExampleMediator } from "../support/ExampleMediator"; import { ExampleMediator2 } from "../support/ExampleMediator2"; +import { ExampleSpriteMediator } from "../support/ExampleSpriteMediator"; import { HappyGuard } from "../support/HappyGuard"; import { HookWithMediatorAndViewInjectionReportFunction } from "../support/HookWithMediatorAndViewInjectionReportFunction"; import { MediatorWatcher } from "../support/MediatorWatcher"; @@ -108,19 +108,17 @@ describe("MediatorMap", () => { it("handler_creates_mediator_for_view_mapped_by_matcher", () => { mediatorMap .mapMatcher(new TypeMatcher().allOf(Container)) - .toMediator(ExampleDisplayObjectMediator); + .toMediator(ExampleSpriteMediator); mediatorMap.handleView(new Sprite(), Sprite); - const expectedNotifications: string[] = ["ExampleDisplayObjectMediator"]; + const expectedNotifications: string[] = ["ExampleSpriteMediator"]; assert.deepEqual(expectedNotifications, mediatorWatcher.notifications); }); it("handler_doesnt_create_mediator_for_wrong_view_mapped_by_matcher", () => { - mediatorMap - .mapMatcher(new TypeMatcher().allOf(Text)) - .toMediator(ExampleDisplayObjectMediator); + mediatorMap.mapMatcher(new TypeMatcher().allOf(Text)).toMediator(ExampleSpriteMediator); mediatorMap.handleView(new Sprite(), Sprite); diff --git a/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/ExampleDisplayObjectMediator.ts b/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/ExampleSpriteMediator.ts similarity index 86% rename from packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/ExampleDisplayObjectMediator.ts rename to packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/ExampleSpriteMediator.ts index e442f3ca..a72f4a99 100644 --- a/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/ExampleDisplayObjectMediator.ts +++ b/packages/pixi/test/robotlegs/bender/extensions/mediatorMap/support/ExampleSpriteMediator.ts @@ -10,7 +10,7 @@ import { Sprite } from "pixi.js"; import { MediatorWatcher } from "./MediatorWatcher"; @injectable() -export class ExampleDisplayObjectMediator { +export class ExampleSpriteMediator { @inject(MediatorWatcher) public mediatorWatcher: MediatorWatcher; @@ -18,6 +18,6 @@ export class ExampleDisplayObjectMediator { public view: Sprite; public initialize(): void { - this.mediatorWatcher.notify("ExampleDisplayObjectMediator"); + this.mediatorWatcher.notify("ExampleSpriteMediator"); } }