Skip to content

Commit d5398b6

Browse files
committed
Better asserts.
1 parent a63513b commit d5398b6

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient.Tests/FbBlobTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void BinaryBlobTest()
6969
{
7070
if (insert_values[i] != select_values[i])
7171
{
72-
throw new Exception("differences at index " + i.ToString());
72+
Assert.Fail("differences at index " + i.ToString());
7373
}
7474
}
7575
}
@@ -121,7 +121,7 @@ public void ReaderGetBytes()
121121
{
122122
if (insert_values[i] != select_values[i])
123123
{
124-
throw new Exception("differences at index " + i.ToString());
124+
Assert.Fail("differences at index " + i.ToString());
125125
}
126126
}
127127
}

Provider/src/FirebirdSql.Data.FirebirdClient.Tests/FbCommandTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,7 @@ public void InsertNullTest()
450450
try
451451
{
452452
command.ExecuteNonQuery();
453-
454-
throw new Exception("The command was executed without throw an exception");
453+
Assert.Fail("The command was executed without throwing an exception");
455454
}
456455
catch
457456
{ }

Provider/src/FirebirdSql.Data.FirebirdClient.Tests/GuidTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void InsertNullGuidTest()
8383
{
8484
if (!r.IsDBNull(1))
8585
{
86-
throw new Exception();
86+
Assert.Fail();
8787
}
8888
}
8989
}

0 commit comments

Comments
 (0)