public void GetType_TypeInAssembly_ReturnsType() { var subject = new AssemblyTypeContainer(GetType().Assembly); var result = subject.GetType(typeof(AssemblyTypeContainerTests).FullName); Assert.AreEqual(typeof(AssemblyTypeContainerTests), result); }
public void GetType_SlashInsteadOfPlusInNestedTypeName_ReturnsNestedType() { var subject = new AssemblyTypeContainer(GetType().Assembly); var result = subject.GetType(typeof(NestedType).FullName.Replace("+", "/")); Assert.AreEqual(typeof(NestedType), result); }
public void GetType_TypeNotInAssembly_ThrowsTypeLoadException() { var subject = new AssemblyTypeContainer(typeof(object).Assembly); Assert.Throws <TypeLoadException>(() => { subject.GetType(typeof(AssemblyTypeContainerTests).FullName); }); }