-
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.
test: Add tests for flag counters (#76)
- Loading branch information
1 parent
1c0b6ca
commit fb98351
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
tests/Application.Tests/Players/Accounts/FlagCounterTests.cs
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,64 @@ | ||
namespace CTF.Application.Tests.Players.Accounts; | ||
|
||
public class FlagCounterTests | ||
{ | ||
[Test] | ||
public void AddBroughtFlags_WhenCalledTwice_ShouldBeIncreasedTo2() | ||
{ | ||
// Arrange | ||
var player = new PlayerInfo(); | ||
int expected = 2; | ||
|
||
// Act | ||
player.AddBroughtFlags(); | ||
player.AddBroughtFlags(); | ||
|
||
// Assert | ||
player.BroughtFlags.Should().Be(expected); | ||
} | ||
|
||
[Test] | ||
public void AddCapturedFlags_WhenCalledTwice_ShouldBeIncreasedTo2() | ||
{ | ||
// Arrange | ||
var player = new PlayerInfo(); | ||
int expected = 2; | ||
|
||
// Act | ||
player.AddCapturedFlags(); | ||
player.AddCapturedFlags(); | ||
|
||
// Assert | ||
player.CapturedFlags.Should().Be(expected); | ||
} | ||
|
||
[Test] | ||
public void AddDroppedFlags_WhenCalledTwice_ShouldBeIncreasedTo2() | ||
{ | ||
// Arrange | ||
var player = new PlayerInfo(); | ||
int expected = 2; | ||
|
||
// Act | ||
player.AddDroppedFlags(); | ||
player.AddDroppedFlags(); | ||
|
||
// Assert | ||
player.DroppedFlags.Should().Be(expected); | ||
} | ||
|
||
[Test] | ||
public void AddReturnedFlags_WhenCalledTwice_ShouldBeIncreasedTo2() | ||
{ | ||
// Arrange | ||
var player = new PlayerInfo(); | ||
int expected = 2; | ||
|
||
// Act | ||
player.AddReturnedFlags(); | ||
player.AddReturnedFlags(); | ||
|
||
// Assert | ||
player.ReturnedFlags.Should().Be(expected); | ||
} | ||
} |