This documentation is archived and is not being maintained.

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

Verifies that two specified singles 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(
	float expected,
	float actual,
	float delta,
	string message
)

Parameters

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

ExceptionCondition
AssertFailedException

expected is not equal to actual.

Show: