コード例 #1
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the first value is greater than the second value.
 /// </summary>
 /// <typeparam name="T">The type of the values to compare.</typeparam>
 /// <param name="arg1">The first value, expected to be greater.</param>
 /// <param name="arg2">The second value, expected to be less.</param>
 public static void Greater <T>(T arg1, T arg2) where T : IComparable
 {
     ConditionAssert.Greater(arg1, arg2, Strings.Assertion_IsComparisonOrEqualTo, arg2, "less", arg1);
 }
コード例 #2
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the first value is greater than the second value.
 /// </summary>
 /// <typeparam name="T">The type of the values to compare.</typeparam>
 /// <param name="arg1">The first value, expected to be greater.</param>
 /// <param name="arg2">The second value, expected to be less.</param>
 /// <param name="message">A message to display. This message can be seen in the unit test results.</param>
 public static void Greater <T>(T arg1, T arg2, string message) where T : IComparable
 {
     ConditionAssert.Greater(arg1, arg2, message, null);
 }
コード例 #3
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the specified condition is <see langword="true"/>.
 /// The assertion fails if the condition is <see langword="false"/>.
 /// </summary>
 /// <param name="condition">The condition to verify is <see langword="true"/>.</param>
 /// <exception cref="Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException">
 /// <paramref name="condition"/> evaluates to <see langword="false"/>.</exception>
 public static void IsTrue(bool?condition)
 {
     ConditionAssert.IsTrue(condition, Strings.Assertion_GenericFailure, true, condition);
 }
コード例 #4
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the specified condition is <see langword="true"/>.
 /// The assertion fails if the condition is <see langword="false"/>.
 /// Displays a message if the assertion fails.
 /// </summary>
 /// <param name="condition">The condition to verify is <see langword="true"/>.</param>
 /// <param name="message">A message to display if the assertion fails. This message can be seen in the unit test results.</param>
 /// <exception cref="Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException">
 /// <paramref name="condition"/> evaluates to <see langword="false"/>.</exception>
 public static void IsTrue(bool?condition, string message)
 {
     ConditionAssert.IsTrue(condition, message, null);
 }
コード例 #5
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the value is <see cref="Double.NaN"/>.
 /// </summary>
 /// <param name="value">The value to test.</param>
 public static void IsNaN(double value)
 {
     ConditionAssert.IsNaN(value, Strings.Assertion_GenericFailure, Double.NaN, value);
 }
コード例 #6
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the value is <see cref="Double.NaN"/>.
 /// </summary>
 /// <param name="value">The value to test.</param>
 /// <param name="message">A message to display. This message can be seen in the unit test results.</param>
 public static void IsNaN(double value, string message)
 {
     ConditionAssert.IsNaN(value, message, null);
 }
コード例 #7
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the first value is less than or equal to the second value.
 /// </summary>
 /// <typeparam name="T">The type of the values to compare.</typeparam>
 /// <param name="arg1">The first value, expected to be less.</param>
 /// <param name="arg2">The second value, expected to be greater.</param>
 /// <param name="message">A message to display. This message can be seen in the unit test results.</param>
 public static void LessOrEqual <T>(T arg1, T arg2, string message) where T : IComparable
 {
     ConditionAssert.LessOrEqual(arg1, arg2, message, null);
 }
コード例 #8
0
ファイル: ConditionAssert.cs プロジェクト: tevfikoguz/cadru
 /// <summary>
 /// Verifies that the first value is less than or equal to the second value.
 /// </summary>
 /// <typeparam name="T">The type of the values to compare.</typeparam>
 /// <param name="arg1">The first value, expected to be less.</param>
 /// <param name="arg2">The second value, expected to be greater.</param>
 public static void LessOrEqual <T>(T arg1, T arg2) where T : IComparable
 {
     ConditionAssert.LessOrEqual(arg1, arg2, Strings.Assertion_IsComparison, arg2, "greater", arg1);
 }
コード例 #9
0
 /// <summary>
 /// Verifies that the specified condition is <see langword="false"/>.
 /// The assertion fails if the condition is <see langword="true"/>.
 /// </summary>
 /// <param name="condition">The condition to verify is <see langword="false"/>.</param>
 /// <exception cref="Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException">
 /// <paramref name="condition"/> evaluates to <see langword="true"/>.</exception>
 public static void IsFalse(bool?condition)
 {
     ConditionAssert.IsFalse(condition, Resources.Assertion_GenericFailure, true, condition);
 }
コード例 #10
0
 /// <summary>
 /// Verifies that the first value is less than the second value.
 /// </summary>
 /// <typeparam name="T">The type of the values to compare.</typeparam>
 /// <param name="arg1">The first value, expected to be less.</param>
 /// <param name="arg2">The second value, expected to be greater.</param>
 public static void Less <T>(T arg1, T arg2) where T : IComparable
 {
     ConditionAssert.Less(arg1, arg2, Resources.Assertion_IsComparisonOrEqualTo, arg2, "greater", arg1);
 }
コード例 #11
0
 /// <summary>
 /// Verifies that the first value is greater than or equal to the second value.
 /// </summary>
 /// <typeparam name="T">The type of the values to compare.</typeparam>
 /// <param name="arg1">The first value, expected to be greater.</param>
 /// <param name="arg2">The second value, expected to be less.</param>
 public static void GreaterOrEqual <T>(T arg1, T arg2) where T : IComparable
 {
     ConditionAssert.GreaterOrEqual(arg1, arg2, Resources.Assertion_IsComparison, arg2, "less", arg1);
 }