public void SubstituteGenericParameters_NonGenericType() { var nonGeneric = ReflectionObjectMother.GetSomeNonGenericType(); var result = _context.SubstituteGenericParameters(nonGeneric, _parametersToArguments); Assert.That(result, Is.SameAs(nonGeneric)); }
public void IsGenericTypeInstantiation() { var nonGenericType = ReflectionObjectMother.GetSomeNonGenericType(); var genericTypeDefinition = typeof(List <>); var typeInstantiation = typeof(List <string>); Assert.That(nonGenericType.IsGenericTypeInstantiation(), Is.False); Assert.That(genericTypeDefinition.IsGenericTypeInstantiation(), Is.False); Assert.That(typeInstantiation.IsGenericTypeInstantiation(), Is.True); }