Ejemplo n.º 1
0
 public static bool Same(
     object instanceA,
     object instanceB,
     string message = "Expected references to be the same.")
 => Asserts.True(object.ReferenceEquals(instanceA, instanceB), message);
Ejemplo n.º 2
0
 public static bool Nonnull(
     object?instance,
     string?message = null)
 => Asserts.True(instance != null,
                 message ?? "Expected reference to be nonnull.");
Ejemplo n.º 3
0
 public static void Null(
     object?instance,
     string message = "Expected reference to be null.")
 => Asserts.True(instance == null, message);
Ejemplo n.º 4
0
 public static bool False(bool value, string?message = null)
 => Asserts.True(!value, message ?? "Expected to be false.");