import { Abstraction , ExtendedAbstraction , ConcreteImplementationA , ConcreteImplementationB , } from '../src/bridge' ; test ( 'bridge.ts -> Abstraction' , ( ) => { const implementationA = new ConcreteImplementationA ( ) ; const abstractionA = new Abstraction ( implementationA ) ; expect ( abstractionA . operation ( ) ) . toEqual ( 'Abstraction: Base operation with ConcreteImplementationA' ) ; const implementationB = new ConcreteImplementationB ( ) ; const abstractionB = new Abstraction ( implementationB ) ; expect ( abstractionB . operation ( ) ) . toEqual ( 'Abstraction: Base operation with ConcreteImplementationB' ) ; } ) ; test ( 'bridge.ts -> ExtendedAbstraction' , ( ) => { const implementationA = new ConcreteImplementationA ( ) ; const abstractionA = new ExtendedAbstraction ( implementationA ) ; expect ( abstractionA . operation ( ) ) . toEqual ( 'Abstraction: Extended operation with ConcreteImplementationA' ) ; const implementationB = new ConcreteImplementationB ( ) ; const abstractionB = new ExtendedAbstraction ( implementationB ) ; expect ( abstractionB . operation ( ) ) . toEqual ( 'Abstraction: Extended operation with ConcreteImplementationB' ) ; } ) ;