示例#1
0
        public async Task GroupByAccountGroupAsync_WhenCalled_ReturnsReadOnlyDictionaryWhereAllAccountCollectionsIsCalculated()
        {
            IAccountCollection sut = CreateSut();

            sut.Add(CreateAccountCollection());

            DateTime statusDate = DateTime.Now.AddDays(_random.Next(1, 365) * -1);
            IReadOnlyDictionary <IAccountGroup, IAccountCollection> result = await(await sut.CalculateAsync(statusDate)).GroupByAccountGroupAsync();

            Assert.That(result.Select(item => item.Value.StatusDate).All(value => value == statusDate.Date), Is.True);
        }