public async Task DomainQueryAsyncWithSingletonQueryReturnsResult() { var domain = new TestDomain(); var result = await domain.QueryAsync( domain.Source <string>("Test"), q => q.Single()); Assert.Equal("Test", result); }
public async Task DomainQueryAsyncWithQueryReturnsResults() { var domain = new TestDomain(); var results = await domain.QueryAsync( domain.Source <string>("Test")); Assert.True(results.SequenceEqual(new string[] { "Test" })); }
public async Task DomainQueryAsyncCorrectlyForwardsCall() { var domain = new TestDomain(); var queryRequest = new QueryRequest( domain.Source <string>("Test"), true); var queryResult = await domain.QueryAsync(queryRequest); Assert.True(queryResult.Results.Cast <string>() .SequenceEqual(new string[] { "Test" })); }