This documentation is archived and is not being maintained.

Assert.AreEqual Method (Double, Double, Double, String)

Verifies that two specified doubles are equal, or within the specified accuracy of each other. The assertion fails if they are not within the specified accuracy of each other. Displays a message if the assertion fails.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

public static void AreEqual(
	double expected,
	double actual,
	double delta,
	string message
)

Parameters

expected
Type: System.Double
actual
Type: System.Double
delta
Type: System.Double
message
Type: System.String

ExceptionCondition
AssertFailedException

expected is different from actual by more than delta.

Show: