public void Should_load_all_external_resources()
        {
            var id      = new EntityId(new Uri(BaseUri, "#test"));
            var another = new EntityId(new Uri(BaseUri, "#another"));
            var graph   = new Graph();

            graph.Assert(graph.CreateUriNode(id.Uri), graph.CreateUriNode(new Uri(BaseUri, "predicate")), graph.CreateLiteralNode("test"));
            graph.Assert(graph.CreateUriNode(another.Uri), graph.CreateUriNode(new Uri(BaseUri, "predicate")), graph.CreateLiteralNode("test"));
            WebRequest request = null;
            Stream     data    = new MemoryStream();

            SerializeTriples(graph, data);
            _strategy = new UrlMatchingResourceResolutionStrategy(
                CreateOntologyProvider(),
                new[] { typeof(IPerson).GetTypeInfo().Assembly },
                new[] { BaseUri },
                uri => request = CreateWebRequest(uri, data));

            var result = _strategy.Resolve(id);

            _strategy.Resolve(another);

            result.Should().NotBeNull();
            result.Context.Store.GetEntityQuads(id).Should().HaveCount(2);
            Mock.Get(request).Verify(instance => instance.GetResponseAsync(), Times.Once);
        }
        public void Should_not_load_external_resource()
        {
            _strategy = new UrlMatchingResourceResolutionStrategy(CreateOntologyProvider(), null, new[] { BaseUri });

            var result = _strategy.Resolve(new EntityId(new Uri("http://test.uri/")));

            result.Should().BeNull();
        }