コード例 #1
0
        public void WithType_fails_and_logs_error_with_the_context()
        {
            var builder = new GraphBuilder(new Registry[0]);
            builder.WithType(new TypePath("a,a"), "creating a Plugin", obj => Assert.Fail("Should not be called"));

            builder.PluginGraph.Log.AssertHasError(131);
        }
コード例 #2
0
        public void WithType_calls_through_to_the_Action_if_the_type_can_be_found()
        {
            var builder = new GraphBuilder(new Registry[0]);
            bool iWasCalled = true;

            builder.WithType(new TypePath(GetType()), "creating a Plugin", t =>
            {
                iWasCalled = true;
                Assert.AreEqual(GetType(), t);
            });

            Assert.IsTrue(iWasCalled);
        }