示例#1
0
        public async Task Integration_InitServiceWithInvalidApiKey()
        {
            // initialize
            var storage     = new SqlFeatureStorage(FeatureStorageLogger.Object, _dbContextFactory);
            var service     = new FeatureService(FeatureServiceLogger.Object, storage);
            var initialized = await service.Initialize(validApiKey, myApplication);

            Assert.True(initialized);
            service.Reset();
            var initResult = await service.Initialize("invalidApiKey", myApplication);

            Assert.NotNull(service);
            Assert.False(initResult);
        }
示例#2
0
        public async Task Integration_InitServiceWithNewApplication()
        {
            // initialize
            var storage     = new SqlFeatureStorage(FeatureStorageLogger.Object, _dbContextFactory);
            var service     = new FeatureService(FeatureServiceLogger.Object, storage);
            var initialized = await service.Initialize(validApiKey, "OtherApplication");

            Assert.True(initialized);
        }