Esempio n. 1
0
        public void Should_support_INodeFactory_injection()
        {
            var nodeFactory = new NodeFactoryStub();
            var createCalled = false;
            nodeFactory.CreateHandler = () =>
            {
                createCalled = true;
                return new Node();
            };
            var graph = new DirectedGraph(nodeFactory);
            graph.AddNode();

            createCalled.ShouldBe(true);
        }