public async Task ReturnsSkipIfDelegateRuleReturnsSkip()
        {
            using (var context = new DelegateToFieldRuleTestContext(new Skip("Skipped by test")))
            {
                var rule = new DelegateToFieldRule <IComplexGraphType, Photo, IComplexGraphType, Album, long>(
                    context.PhotoField,
                    "album",
                    photo => photo.AlbumId);
                var result = await rule.AuthorizeAsync(context.AuthContext);

                Assert.IsType <Skip>(result);
            }
        }
        public async Task ReturnsAllowIfDelegateRuleReturnsAllowOnSourceType()
        {
            using (var context = new DelegateToFieldRuleTestContext(new Allow <Album>("Allowed by test")))
            {
                var rule = new DelegateToFieldRule <IComplexGraphType, Photo, IComplexGraphType, Album, long>(
                    context.PhotoField,
                    "album",
                    photo => photo.AlbumId);
                var result = await rule.AuthorizeAsync(context.AuthContext);

                Assert.IsType <Allow <Photo> >(result);
            }
        }