-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41aa616
commit 90a8cb2
Showing
5 changed files
with
100 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Northwind.Domain.Common; | ||
|
||
namespace Northwind.Domain.UnitTests.Common; | ||
|
||
public class CountryTests | ||
{ | ||
[Fact] | ||
public void IsAustralia_GivenAustralianCountry_ReturnsTrue() | ||
{ | ||
// Arrange | ||
var country = new Country("Australia"); | ||
|
||
// Act | ||
var result = country.IsAustralia; | ||
|
||
// Assert | ||
result.Should().BeTrue(); | ||
} | ||
|
||
[Fact] | ||
public void IsAustralia_GivenNonAustralianCountry_ReturnsFalse() | ||
{ | ||
// Arrange | ||
var country = new Country("New Zealand"); | ||
|
||
// Act | ||
var result = country.IsAustralia; | ||
|
||
// Assert | ||
result.Should().BeFalse(); | ||
} | ||
} |
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,32 @@ | ||
using Northwind.Domain.Customers; | ||
|
||
namespace Northwind.Domain.UnitTests.Common; | ||
|
||
public class PhoneTests | ||
{ | ||
[Fact] | ||
public void IsQueenslandLandline_GivenQLDNumber_ReturnsTrue() | ||
{ | ||
// Arrange | ||
var phone = new Phone("0733333333"); | ||
|
||
// Act | ||
var result = phone.IsQueenslandLandLine; | ||
|
||
// Assert | ||
result.Should().BeTrue(); | ||
} | ||
|
||
[Fact] | ||
public void IsQueenslandLandline_GivenNonQLDNumber_ReturnsFalse() | ||
{ | ||
// Arrange | ||
var phone = new Phone("0833333333"); | ||
|
||
// Act | ||
var result = phone.IsQueenslandLandLine; | ||
|
||
// Assert | ||
result.Should().BeFalse(); | ||
} | ||
} |
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,32 @@ | ||
using Northwind.Domain.Common; | ||
|
||
namespace Northwind.Domain.UnitTests.Common; | ||
|
||
public class PostCodeTests | ||
{ | ||
[Fact] | ||
public void IsQueenslandPostCode_GivenQLDPostCode_ReturnsTrue() | ||
{ | ||
// Arrange | ||
var postCode = new PostCode("4000"); | ||
|
||
// Act | ||
var result = postCode.IsQueenslandPostCode; | ||
|
||
// Assert | ||
result.Should().BeTrue(); | ||
} | ||
|
||
[Fact] | ||
public void IsQueenslandPostCode_GivenNonQLDPostCode_ReturnsFalse() | ||
{ | ||
// Arrange | ||
var postCode = new PostCode("2000"); | ||
|
||
// Act | ||
var result = postCode.IsQueenslandPostCode; | ||
|
||
// Assert | ||
result.Should().BeFalse(); | ||
} | ||
} |
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,4 @@ | ||
// Global using directives | ||
|
||
global using FluentAssertions; | ||
global using Xunit; |