Ejemplo n.º 1
0
        public void GetComponentTest2()
        {
            var soba = new Soba(new UVars());

            Assert.True(soba.Register(new StubTryComponent(soba)));
            Assert.True(soba.Register(new StubEvMSBuildComponent(soba)));
            Assert.True(soba.Register(new StubBoxComponent(soba)));

            Assert.Equal(typeof(StubTryComponent), soba.GetComponent(typeof(StubTryComponent)).GetType());
            Assert.Equal(typeof(StubBoxComponent), soba.GetComponent(typeof(StubBoxComponent)).GetType());

            Assert.Null(soba.GetComponent(typeof(StubUserVariableComponent)));
        }