forked from xunit/assert.xunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assert.cs
46 lines (42 loc) · 1.15 KB
/
Assert.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#if XUNIT_NULLABLE
#nullable enable
#endif
using System;
using System.ComponentModel;
namespace Xunit
{
/// <summary>
/// Contains various static methods that are used to verify that conditions are met during the
/// process of running tests.
/// </summary>
#if XUNIT_VISIBILITY_INTERNAL
internal
#else
public
#endif
partial class Assert
{
/// <summary>
/// Initializes a new instance of the <see cref="Assert"/> class.
/// </summary>
protected Assert() { }
/// <summary>Do not call this method.</summary>
[Obsolete("This is an override of Object.Equals(). Call Assert.Equal() instead.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public new static bool Equals(
object a,
object b)
{
throw new InvalidOperationException("Assert.Equals should not be used");
}
/// <summary>Do not call this method.</summary>
[Obsolete("This is an override of Object.ReferenceEquals(). Call Assert.Same() instead.", true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public new static bool ReferenceEquals(
object a,
object b)
{
throw new InvalidOperationException("Assert.ReferenceEquals should not be used");
}
}
}