4.0.11 • Published 4 years ago

unit-test-ts-ioc-container v4.0.11

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

npm bundle size

UnitTest TS IoContainer

Advantages

  • simple (it's just decorator for IServiceLocator from ts-ioc-container)
  • clean API
  • flexible (you can use any mocking engine just need to implement IMockAdapter)
  • auto-mocking
  • provides MoqAdapter to support moq.ts
import {Mock} from 'moq.ts';
import {ServiceLocatorFactory} from 'ts-ioc-container';
import {UnitTestServiceLocatorFactory, MoqAdapter, MoqAdapter} from 'unit-test-ts-ioc-container';

const container = new ServiceLocatorFactory().createIoCLocator();
const mockFactory = () => new MoqAdapter(new Mock());
const unitTestContainer = new UnitTestServiceLocatorFactory(mockFactory).create(container);

const stickerMock = unitTestContainer.resolveMock('ISticker');
stickerMock.setup(i => i.title).return('Sticker title');
4.0.11

4 years ago

4.0.10

4 years ago

4.0.9

4 years ago

4.0.5

4 years ago

4.0.4

4 years ago

4.0.7

4 years ago

4.0.6

4 years ago

4.0.3

4 years ago

3.0.3

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

4.0.2

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.4

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.0.2

4 years ago

2.1.3

4 years ago

2.1.0

4 years ago

1.4.3

4 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.13

5 years ago

1.3.12

5 years ago

1.3.10

5 years ago

1.3.11

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago