diff options
| author | ivar <i@oiee.no> | 2025-10-19 23:41:23 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-10-19 23:41:23 +0200 |
| commit | 3f4c0720e1e3421431e7baa20882a4a4512a7fab (patch) | |
| tree | 734ca81d7d0841d8863e3f523ebba14c282dc681 /tests/IOL.Fagprove.Tests/EmailTests.cs | |
| download | fagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.tar.xz fagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.zip | |
Diffstat (limited to 'tests/IOL.Fagprove.Tests/EmailTests.cs')
| -rw-r--r-- | tests/IOL.Fagprove.Tests/EmailTests.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/IOL.Fagprove.Tests/EmailTests.cs b/tests/IOL.Fagprove.Tests/EmailTests.cs new file mode 100644 index 0000000..01e6bbd --- /dev/null +++ b/tests/IOL.Fagprove.Tests/EmailTests.cs @@ -0,0 +1,32 @@ +using IOL.Fagprove.Utilities; +using Xunit; + +namespace PIT.ReservationService.Tests +{ + public class EmailTests + { + [Fact] + public void SendsMailGivenValidPayload() + { + var email = new Email + { + Message = "Hello", + Recepient = "ivar@protektit.no", + Title = "Test mail" + }; + Assert.True(email.Send()); + } + + [Fact] + public void DoesNotSendMailGivenInValidPayload() + { + var email = new Email + { + Message = "", + Recepient = "xxx@*a12.o", + Title = "Test mail" + }; + Assert.False(email.Send()); + } + } +}
\ No newline at end of file |
