Exemple #1
0
        public async Task DomainQueryAsyncWithSingletonQueryReturnsResult()
        {
            var domain = new TestDomain();

            var result = await domain.QueryAsync(
                domain.Source <string>("Test"), q => q.Single());

            Assert.Equal("Test", result);
        }
Exemple #2
0
        public async Task DomainQueryAsyncWithQueryReturnsResults()
        {
            var domain = new TestDomain();

            var results = await domain.QueryAsync(
                domain.Source <string>("Test"));

            Assert.True(results.SequenceEqual(new string[] { "Test" }));
        }
Exemple #3
0
        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" }));
        }