generated from goatcorp/SamplePlugin
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test fixture for territory instances, to fix the tests
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
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,25 @@ | ||
using ScoutHelper; | ||
using ScoutHelper.Config; | ||
using ScoutHelper.Models; | ||
using static ScoutHelper.Utils.Utils; | ||
|
||
namespace ScoutHelperTests; | ||
|
||
public class TestFixture : IDisposable { | ||
public Configuration Conf { get; } | ||
|
||
public TestFixture() { | ||
Conf = new Configuration(); | ||
var territoryIds = GetEnumValues<Territory>() | ||
.PairWith(territory => (uint)territory) | ||
.AsList(); | ||
territoryIds | ||
.Select(territoryId => (territoryId.second, territoryId.first.DefaultInstances())) | ||
.UseToUpdate(Conf.Instances); | ||
TerritoryExtensions.SetTerritoryInstances(Conf, territoryIds); | ||
} | ||
|
||
public void Dispose() { | ||
// nothing to dispose yet | ||
} | ||
} |
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