-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Broadcast model and add unit tests for initial properties
- Loading branch information
1 parent
30c5466
commit 85644ef
Showing
2 changed files
with
101 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
using Xunit; | ||
using Tailwind.Mail.Models; | ||
|
||
namespace Tailwind.Mail.Tests | ||
{ | ||
public class BroadcastTests | ||
{ | ||
[Fact] | ||
public void Broadcast_DefaultStatus_ShouldBePending() | ||
{ | ||
// Arrange | ||
var broadcast = new Broadcast(); | ||
|
||
// Act | ||
var status = broadcast.Status; | ||
|
||
// Assert | ||
Assert.Equal("pending", status); | ||
} | ||
|
||
[Fact] | ||
public void Broadcast_ID_ShouldBeNullInitially() | ||
{ | ||
// Arrange | ||
var broadcast = new Broadcast(); | ||
|
||
// Act | ||
var id = broadcast.ID; | ||
|
||
// Assert | ||
Assert.Null(id); | ||
} | ||
|
||
[Fact] | ||
public void Broadcast_EmailId_ShouldBeNullInitially() | ||
{ | ||
// Arrange | ||
var broadcast = new Broadcast(); | ||
|
||
// Act | ||
var emailId = broadcast.EmailId; | ||
|
||
// Assert | ||
Assert.Null(emailId); | ||
} | ||
|
||
[Fact] | ||
public void Broadcast_Name_ShouldBeNullInitially() | ||
{ | ||
// Arrange | ||
var broadcast = new Broadcast(); | ||
|
||
// Act | ||
var name = broadcast.Name; | ||
|
||
// Assert | ||
Assert.Null(name); | ||
} | ||
|
||
[Fact] | ||
public void Broadcast_Slug_ShouldBeNullInitially() | ||
{ | ||
// Arrange | ||
var broadcast = new Broadcast(); | ||
|
||
// Act | ||
var slug = broadcast.Slug; | ||
|
||
// Assert | ||
Assert.Null(slug); | ||
} | ||
|
||
[Fact] | ||
public void Broadcast_ReplyTo_ShouldBeNullInitially() | ||
{ | ||
// Arrange | ||
var broadcast = new Broadcast(); | ||
|
||
// Act | ||
var replyTo = broadcast.ReplyTo; | ||
|
||
// Assert | ||
Assert.Null(replyTo); | ||
} | ||
} | ||
} |