public void should_validate_class_is_assignable() { Action action = () => ClassLoader.New <ClassLoaderTestClass>("Crux.Core.Tests.ClassLoaderTester, Crux.Core.Tests"); action.ShouldThrow <ActivationException>().WithMessage("The type * cannot be assigned to type *"); }
public void should_lookup_types_from_given_assembly_path() { ClassLoader.New <IClassLoaderTestClass>(Assembly.GetExecutingAssembly().Location, "Crux.Core.Tests.ClassLoaderTestClass") .Should().BeOfType <ClassLoaderTestClass>(); }
public void should_throw_if_type_not_found() { Action action = () => ClassLoader.New("InvalidType"); action.ShouldThrow <ActivationException>().WithMessage("Could not find type *"); }
public void should_lookup_types_from_calling_assembly() { ClassLoader.New("Crux.Core.Tests.ClassLoaderTestClass") .Should().BeOfType <ClassLoaderTestClass>(); }
public void should_instantiate_class_by_name() { ClassLoader.New("Crux.Core.Tests.ClassLoaderTestClass, Crux.Core.Tests") .Should().BeOfType <ClassLoaderTestClass>(); }