Пример #1
0
        public void GetCurrentDomainAssemblies_Should_OK()
        {
            var reflectionHelper = new SimpleActivator();
            var count            = reflectionHelper.GetCurrentDomainAssemblies().Count;

            (count > 0).ShouldTrue();
        }
Пример #2
0
        public void CreateInstance_Default_Should_ReturnOK()
        {
            var reflectionHelper = new SimpleActivator();
            var instances        = reflectionHelper.CreateAllInstance <InvokeDemoA>().SingleOrDefault();

            instances.ShouldNotNull();
            instances.Foo().ShouldEqual("A");
        }
Пример #3
0
        public void CreateAllInstance_NoDefaultCtor_Should_ThrowEx()
        {
            var reflectionHelper = new SimpleActivator();

            reflectionHelper.CreateAllInstance(typeof(NoDefaultCtor));
        }
Пример #4
0
        public void CreateAllInstance_Null_Should_ThrowEx()
        {
            var reflectionHelper = new SimpleActivator();

            reflectionHelper.CreateAllInstance(null);
        }