-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed basic support for tostring.
- Loading branch information
1 parent
839f9fa
commit 5b41a7d
Showing
2 changed files
with
30 additions
and
3 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,22 @@ | ||
namespace Hussy.Net.Tests.Display; | ||
|
||
public class ToStringTests | ||
{ | ||
[Fact] | ||
public void ToString_NullInput_ReturnsNullLiteral() | ||
{ | ||
const string expectedResult = "null"; | ||
int? testValue = null; | ||
var actualResult = testValue.Ts(); | ||
Assert.Equal(expectedResult, actualResult); | ||
} | ||
|
||
[Fact] | ||
public void ToString_ValidInput_ReturnsInputAsString() | ||
{ | ||
const string expectedResult = "32"; | ||
var testValue = 32; | ||
var actualResult = testValue.Ts(); | ||
Assert.Equal(expectedResult, actualResult); | ||
} | ||
} |