Beispiel #1
0
 /// <summary>
 /// Asserts that an object may be assigned a  value of a given Type.
 /// </summary>
 /// <typeparam name="TExpected">The expected Type.</typeparam>
 /// <param name="actual">The object under examination</param>
 public static void IsAssignableFrom <TExpected>(object actual)
 {
     Assert.That(actual, Is.AssignableFrom(typeof(TExpected)), null, null);
 }
Beispiel #2
0
 /// <summary>
 /// Asserts that an object may be assigned a  value of a given Type.
 /// </summary>
 /// <param name="expected">The expected Type.</param>
 /// <param name="actual">The object under examination</param>
 public static void IsAssignableFrom(Type expected, object actual)
 {
     Assert.That(actual, Is.AssignableFrom(expected), null, null);
 }
Beispiel #3
0
 /// <summary>
 /// Asserts that an object may be assigned a  value of a given Type.
 /// </summary>
 /// <typeparam name="TExpected">The expected Type.</typeparam>
 /// <param name="actual">The object under examination</param>
 /// <param name="message">The message to display in case of failure</param>
 /// <param name="args">Array of objects to be used in formatting the message</param>
 public static void IsAssignableFrom <TExpected>(object actual, string message, params object[] args)
 {
     Assert.That(actual, Is.AssignableFrom(typeof(TExpected)), message, args);
 }
Beispiel #4
0
 /// <summary>
 /// Asserts that an object may be assigned a  value of a given Type.
 /// </summary>
 /// <param name="expected">The expected Type.</param>
 /// <param name="actual">The object under examination</param>
 /// <param name="message">The message to display in case of failure</param>
 /// <param name="args">Array of objects to be used in formatting the message</param>
 public static void IsAssignableFrom(Type expected, object actual, string message, params object[] args)
 {
     Assert.That(actual, Is.AssignableFrom(expected), message, args);
 }