コード例 #1
0
        public async Task ShouldCalculateCorrectly(int expectedCount, string value)
        {
            var service = new PermutationsService(_context);
            var result  = await service.CalculateAsync(value);

            Assert.Equal(expectedCount, result.PermutationCount);
        }
コード例 #2
0
        public async Task ShouldStoreCalculated(string value)
        {
            var service = new PermutationsService(_context);
            var result  = await service.CalculateAsync(value);

            var stored = await service.GetAsync(value);

            Assert.NotNull(stored);
            Assert.Equal(result.Value, stored.Value);
        }