public void DiscoverResources_Adds_Resources_From_Current_Assembly_To_Graph()
        {
            // Arrange
            ServiceDiscoveryFacade facade = new ServiceDiscoveryFacade(_services, _resourceGraphBuilder, _options, _loggerFactory);

            facade.AddCurrentAssembly();

            // Act
            facade.DiscoverResources();

            // Assert
            var resourceGraph     = _resourceGraphBuilder.Build();
            var testModelResource = resourceGraph.GetResourceContext(typeof(TestModel));

            Assert.NotNull(testModelResource);
        }
        public void Can_add_resource_from_current_assembly_to_graph()
        {
            // Arrange
            var facade = new ServiceDiscoveryFacade(_services, _resourceGraphBuilder, _options, _loggerFactory);

            facade.AddCurrentAssembly();

            // Act
            facade.DiscoverResources();

            // Assert
            var resourceGraph = _resourceGraphBuilder.Build();

            var resource = resourceGraph.GetResourceContext(typeof(TestResource));

            resource.Should().NotBeNull();
        }
        public void DiscoverResources_Adds_Resources_From_Added_Assembly_To_Graph()
        {
            // Arrange
            ServiceDiscoveryFacade facade = new ServiceDiscoveryFacade(_services, _resourceGraphBuilder, _options, _loggerFactory);

            facade.AddAssembly(typeof(Person).Assembly);

            // Act
            facade.DiscoverResources();

            // Assert
            var resourceGraph   = _resourceGraphBuilder.Build();
            var personResource  = resourceGraph.GetResourceContext(typeof(Person));
            var articleResource = resourceGraph.GetResourceContext(typeof(Article));

            Assert.NotNull(personResource);
            Assert.NotNull(articleResource);
        }
        public void Can_add_resources_from_assembly_to_graph()
        {
            // Arrange
            var facade = new ServiceDiscoveryFacade(_services, _resourceGraphBuilder, _options, _loggerFactory);

            facade.AddAssembly(typeof(Person).Assembly);

            // Act
            facade.DiscoverResources();

            // Assert
            var resourceGraph = _resourceGraphBuilder.Build();

            var personResource = resourceGraph.GetResourceContext(typeof(Person));

            personResource.Should().NotBeNull();

            var articleResource = resourceGraph.GetResourceContext(typeof(Article));

            articleResource.Should().NotBeNull();
        }
        public void Can_add_resources_from_assembly_to_graph()
        {
            // Arrange
            var facade = new ServiceDiscoveryFacade(_services, _resourceGraphBuilder, _options, LoggerFactory);

            facade.AddAssembly(typeof(Person).Assembly);

            // Act
            facade.DiscoverResources();

            // Assert
            IResourceGraph resourceGraph = _resourceGraphBuilder.Build();

            ResourceContext personContext = resourceGraph.GetResourceContext(typeof(Person));

            personContext.Should().NotBeNull();

            ResourceContext todoItemContext = resourceGraph.GetResourceContext(typeof(TodoItem));

            todoItemContext.Should().NotBeNull();
        }