diff --git a/Src/Tests/Helper.cs b/Src/Tests/Helper.cs index 77edffe..4aac7cc 100644 --- a/Src/Tests/Helper.cs +++ b/Src/Tests/Helper.cs @@ -29,13 +29,13 @@ public static void ComparePrivateField(InstanceType ins FieldInfo fi = typeof(InstanceType).GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance); if (fi is null) { - Assert.True(false, "The private field was not found."); + Assert.Fail("The private field was not found."); } object fieldVal = fi.GetValue(instance); if (fieldVal is null) { - Assert.True(false, "The private field value was null."); + Assert.Fail("The private field value was null."); } else if (fieldVal is FieldType actual) { @@ -43,9 +43,9 @@ public static void ComparePrivateField(InstanceType ins } else { - Assert.True(false, $"Field value is not the same type as expected.{Environment.NewLine}" + - $"Actual type: {fieldVal.GetType()}{Environment.NewLine}" + - $"Expected type: {expected.GetType()}"); + Assert.Fail($"Field value is not the same type as expected.{Environment.NewLine}" + + $"Actual type: {fieldVal.GetType()}{Environment.NewLine}" + + $"Expected type: {expected.GetType()}"); } } @@ -60,7 +60,7 @@ public static string ReadResources(string resourceName, string fileExtention = " } else { - Assert.True(false, "File was not found among resources!"); + Assert.Fail("File was not found among resources!"); return ""; } }