Esempio n. 1
0
        public async Task Cleanup()
        {
            await _collection.Dispose();

            _collection = null;
            _provider   = null;
            _store      = null;
            _testData   = null;
        }
Esempio n. 2
0
        public async Task Initialize()
        {
            _collection = new ModuleCollection();

            LinkModelsRegistration.RegisterModules(_collection);
            CommonSerializationRegistration.RegisterModules(_collection);
            _collection.RegisterModule <EsentInstanceProvider, IEsentInstanceProvider>(new EsentInstanceProvider(true));
            _collection.RegisterModule <BoardReferenceStore, IBoardReferenceStore>(new BoardReferenceStore("makaba"));
            _collection.RegisterModule <MakabaBoardReferenceDtoParsers, INetworkDtoParsers>();

            TableVersionStatusForTests.ClearInstance();
            await _collection.Seal();

            _provider = _collection.GetModuleProvider();
            var module = _provider.QueryModule(typeof(IBoardReferenceStore), "makaba") ?? throw new ModuleNotFoundException();

            _store    = module.QueryView <IBoardReferenceStore>() ?? throw new ModuleNotFoundException();
            _testData = module.QueryView <IBoardReferenceStoreForTests>() ?? throw new ModuleNotFoundException();
        }