Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/firebird-ng/src/app/model/component-registry.spec.ts is written in an unsupported language. File is not indexed.

0001 // component-registry.spec.ts
0002 
0003 import { registerComponentFactory, getComponentFactory } from './entry-component';
0004 import { BoxTrackerHitComponentFactory } from './box-tracker-hit.component';
0005 
0006 describe('Component Registry', () => {
0007   it('should register and retrieve BoxTrackerHitComponentFactory correctly', () => {
0008     const factory = new BoxTrackerHitComponentFactory();
0009     registerComponentFactory(factory);
0010 
0011     const retrievedFactory = getComponentFactory('BoxTrackerHit');
0012 
0013     expect(retrievedFactory).toBeDefined();
0014     expect(retrievedFactory).toBe(factory);
0015   });
0016 
0017   it('should return undefined for unregistered component types', () => {
0018     const retrievedFactory = getComponentFactory('UnknownType');
0019 
0020     expect(retrievedFactory).toBeUndefined();
0021   });
0022 });