AsyncSnapshotableRepositoryTests.WithEmptyStoreAndFilledUnitOfWorkAndNoSnapshot.GetAsyncThrowsForUnknownId C# (CSharp) Method

GetAsyncThrowsForUnknownId() private method

private GetAsyncThrowsForUnknownId ( ) : void
return void
            public void GetAsyncThrowsForUnknownId()
            {
                var exception =
                    Assert.Throws<AggregateException>(() => { var _ = _sut.GetAsync(_model.UnknownIdentifier).Result; });
                Assert.That(exception.InnerExceptions, Has.Count.EqualTo(1));
                Assert.That(exception.InnerExceptions[0], Is.InstanceOf<AggregateNotFoundException>());
                var actualException = (AggregateNotFoundException) exception.InnerExceptions[0];
                Assert.That(actualException.Identifier, Is.EqualTo(_model.UnknownIdentifier));
                Assert.That(actualException.ClrType, Is.EqualTo(typeof (SnapshotableAggregateRootEntityStub)));
            }