コード例 #1
0
        public async Task Synchronize_BricksetApiServiceReturnsEmptyList_NothingIsSaved()
        {
            var bricksetApiService = Substitute.For <IBricksetApiService>();

            bricksetApiService
            .GetThemes(Arg.Any <ParameterApiKey>())
            .Returns(Enumerable.Empty <Themes>());

            var themeSynchronizer = CreateTarget(bricksetApiService);

            var themes = await themeSynchronizer.Synchronize(string.Empty).ConfigureAwait(false);

            Check.That(themes).IsEmpty();
            Check.That(_themeRepository.All()).IsEmpty();
        }
コード例 #2
0
        public void All_NoThemes_ReturnsEmpty()
        {
            var allThemes = _themeRepository.All();

            Check.That(allThemes).IsEmpty();
        }