public void CreateInterface_assemblyPathAndTypeName_OK() { var type = typeof(ISimplestComClass); var created = ComClrInfoFactory.CreateInterface(type); Assert.IsNotNull(created.TypeLib); }
public void CreateClass_assemblyPathAndTypeName_OK() { var type = "NRegFreeCom.Tests.SimplestComClass"; var asm = System.Reflection.Assembly.ReflectionOnlyLoadFrom(System.Reflection.Assembly.GetExecutingAssembly().Location); var created = ComClrInfoFactory.CreateClass(asm, type); StringAssert.Contains(type, created.Class); }
public void CreateClass_simpleComClass_hasRuntime() { var created = ComClrInfoFactory.CreateClass(typeof(SimplestComClass)); Assert.IsNotNullOrEmpty(created.RuntimeVersion); }
public void CreateClass_progId_OK() { var result = ComClrInfoFactory.CreateClass(typeof(ProgIdDefinedClass)); StringAssert.AreEqualIgnoringCase("MyProgId", result.ProgId); }
public void CreateClass_noComVisibleAttr_error() { ComClrInfoFactory.CreateClass(typeof(NoComVisibleAttrClass)); }
public void IsComVisible_NoComVisibleAttrClass_false() { Assert.IsFalse(ComClrInfoFactory.IsComVisible(typeof(NoComVisibleAttrClass))); }
public void IsComVisible_stringType_true() { Assert.IsTrue(ComClrInfoFactory.IsComVisible(typeof(string))); }
public void CreateClass_abstract_error() { ComClrInfoFactory.CreateClass(typeof(AbstractClass)); }