public void GetParseMethodForInt32() { MethodInfo parseMethod = StubStringUtility.GetParseMethod(_int32, true); Assert.That(parseMethod, Is.Not.Null); Assert.That(parseMethod.Name, Is.EqualTo("Parse")); Assert.That(parseMethod.GetParameters().Length, Is.EqualTo(2)); Assert.That(parseMethod.GetParameters()[0].ParameterType, Is.EqualTo(typeof(string))); Assert.That(parseMethod.GetParameters()[1].ParameterType, Is.EqualTo(typeof(IFormatProvider))); Assert.That(parseMethod.ReturnType, Is.EqualTo(typeof(int))); Assert.That(parseMethod.IsPublic, Is.True); Assert.That(parseMethod.IsStatic, Is.True); }
public void GetParseMethodForObjectWithoutException() { Assert.That(StubStringUtility.GetParseMethod(_object, false), Is.Null); }
public void GetParseMethodForObjectWithException() { StubStringUtility.GetParseMethod(_object, true); }