Skip to content

Commit

Permalink
Improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIndra55 committed Jan 12, 2025
1 parent 98a9223 commit 443d1ba
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
11 changes: 11 additions & 0 deletions BusinessMonitor.MailTools.Test/BimiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ public void TestInvalidArguments()
});
}

[Test]
public void TestNotFound()
{
var check = new BimiCheck(new DummyResolver());

Assert.Throws<BimiNotFoundException>(() =>
{
check.GetBimiRecord("example.com");
});
}

[Test]
public void TestLookups()
{
Expand Down
11 changes: 11 additions & 0 deletions BusinessMonitor.MailTools.Test/DkimTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ public void TestInvalidArguments()
});
}

[Test]
public void TestNotFound()
{
var check = new DkimCheck(new DummyResolver());

Assert.Throws<DkimNotFoundException>(() =>
{
check.GetDkimRecord("example.com", "test");
});
}

[Test]
public void TestRevoked()
{
Expand Down
11 changes: 11 additions & 0 deletions BusinessMonitor.MailTools.Test/DmarcTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ public void TestInvalidArguments()
});
}

[Test]
public void TestNotFound()
{
var check = new DmarcCheck(new DummyResolver());

Assert.Throws<DmarcNotFoundException>(() =>
{
check.GetDmarcRecord("example.com");
});
}

[Test]
public void TestLookups()
{
Expand Down
3 changes: 0 additions & 3 deletions BusinessMonitor.MailTools/Dkim/DkimCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ public static DkimRecord ParseDkimRecord(string value)
}

break;

default:
break;
}
}

Expand Down
3 changes: 0 additions & 3 deletions BusinessMonitor.MailTools/Spf/SpfCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ private static SpfDirective ParseDirective(string qualifier, string mechanism, s
directive.Domain = value;

break;

default:
break;
}

return directive;
Expand Down

0 comments on commit 443d1ba

Please sign in to comment.