-
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.
- Loading branch information
Showing
6 changed files
with
87 additions
and
8 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
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
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,28 @@ | ||
using GangsAPI.Services.Gang; | ||
|
||
namespace GangsTest.API.Services.Gang; | ||
|
||
public class DeletionTests { | ||
[Theory] | ||
[ClassData(typeof(TestData))] | ||
public async Task Basic(IGangManager mgr) { | ||
var gang = await mgr.CreateGang("Test Gang", 0); | ||
Assert.NotNull(gang); | ||
Assert.Equal("Test Gang", gang.Name); | ||
await mgr.DeleteGang(gang.GangId); | ||
Assert.Null(await mgr.GetGang(gang.GangId)); | ||
} | ||
|
||
[Theory] | ||
[ClassData(typeof(TestData))] | ||
public async Task Multiple(IGangManager mgr) { | ||
var gang1 = await mgr.CreateGang("Test Gang", 0); | ||
var gang2 = await mgr.CreateGang("Other Gang", 1); | ||
Assert.NotNull(gang1); | ||
Assert.NotNull(gang2); | ||
Assert.Equal("Test Gang", gang1.Name); | ||
await mgr.DeleteGang(gang1.GangId); | ||
Assert.Null(await mgr.GetGang(gang1.GangId)); | ||
Assert.NotNull(await mgr.GetGang(gang2.GangId)); | ||
} | ||
} |