Assert.AreNotSame Assert.AreNotSame Assert.AreNotSame Method

Definition

Overloads

AreNotSame(Object, Object, String) AreNotSame(Object, Object, String) AreNotSame(Object, Object, String)

Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.

AreNotSame(Object, Object, String, Object[]) AreNotSame(Object, Object, String, Object[]) AreNotSame(Object, Object, String, Object[])

Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.

AreNotSame(Object, Object) AreNotSame(Object, Object) AreNotSame(Object, Object)

Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.

AreNotSame(Object, Object, String) AreNotSame(Object, Object, String) AreNotSame(Object, Object, String)

Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.

public static void AreNotSame (object notExpected, object actual, string message);
static member AreNotSame : obj * obj * string -> unit
Public Shared Sub AreNotSame (notExpected As Object, actual As Object, message As String)

Parameters

notExpected
Object Object Object

The first object to compare. This is the value the test expects not to match actual.

actual
Object Object Object

The second object to compare. This is the value produced by the code under test.

message
String String String

The message to include in the exception when actual is the same as notExpected. The message is shown in test results.

Exceptions

Thrown if notExpected refers to the same object as actual.

AreNotSame(Object, Object, String, Object[]) AreNotSame(Object, Object, String, Object[]) AreNotSame(Object, Object, String, Object[])

Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.

public static void AreNotSame (object notExpected, object actual, string message, params object[] parameters);
static member AreNotSame : obj * obj * string * obj[] -> unit
Public Shared Sub AreNotSame (notExpected As Object, actual As Object, message As String, ParamArray parameters As Object())

Parameters

notExpected
Object Object Object

The first object to compare. This is the value the test expects not to match actual.

actual
Object Object Object

The second object to compare. This is the value produced by the code under test.

message
String String String

The message to include in the exception when actual is the same as notExpected. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Thrown if notExpected refers to the same object as actual.

AreNotSame(Object, Object) AreNotSame(Object, Object) AreNotSame(Object, Object)

Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.

public static void AreNotSame (object notExpected, object actual);
static member AreNotSame : obj * obj -> unit
Public Shared Sub AreNotSame (notExpected As Object, actual As Object)

Parameters

notExpected
Object Object Object

The first object to compare. This is the value the test expects not to match actual.

actual
Object Object Object

The second object to compare. This is the value produced by the code under test.

Exceptions

Thrown if notExpected refers to the same object as actual.

Applies to