update everything
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Assets.Data
|
||||
0b01101,
|
||||
0b10011,
|
||||
0b01011,
|
||||
0b00111,
|
||||
7,
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
@@ -47,6 +47,21 @@ namespace Assets.Data
|
||||
0b001
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
0,
|
||||
1,
|
||||
new HashSet<long>()
|
||||
{
|
||||
0b0
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
3,
|
||||
1,
|
||||
new HashSet<long>()
|
||||
{
|
||||
}
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
2,
|
||||
3,
|
||||
|
||||
@@ -31,6 +31,18 @@ namespace Assets.Data
|
||||
Assert.IsTrue(expected.Contains(champ));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(typeof(TraitsMappingCase), "TestFilteringChampCombination")]
|
||||
public void TestFilteringChampCombination(
|
||||
long accessibleChampions,
|
||||
long subselectedChampions,
|
||||
long expected
|
||||
)
|
||||
{
|
||||
var output = TraitsMapping.SelectSublistOfChampion(accessibleChampions, subselectedChampions);
|
||||
Assert.AreEqual(expected, output);
|
||||
}
|
||||
}
|
||||
|
||||
public class TraitsMappingCase
|
||||
@@ -76,7 +88,7 @@ namespace Assets.Data
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
ChampionsEnum.EZREAL
|
||||
ChampionsEnum.EZREAL,
|
||||
}
|
||||
),
|
||||
5,
|
||||
@@ -89,7 +101,7 @@ namespace Assets.Data
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.CASSIOPEIA
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
@@ -99,7 +111,7 @@ namespace Assets.Data
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.EZREAL
|
||||
ChampionsEnum.EZREAL,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
@@ -109,7 +121,7 @@ namespace Assets.Data
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
ChampionsEnum.EZREAL
|
||||
ChampionsEnum.EZREAL,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
@@ -119,19 +131,28 @@ namespace Assets.Data
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.CASSIOPEIA,
|
||||
ChampionsEnum.EZREAL
|
||||
ChampionsEnum.EZREAL,
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>() { ChampionsEnum.AHRI, ChampionsEnum.AKALI }
|
||||
),
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.ELISE }),
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.AHRI }),
|
||||
1,
|
||||
3,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(new HashSet<ChampionsEnum>() { ChampionsEnum.ELISE }),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.AKALI,
|
||||
ChampionsEnum.ELISE,
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -142,11 +163,15 @@ namespace Assets.Data
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.POPPY,
|
||||
ChampionsEnum.SORAKA,
|
||||
ChampionsEnum.HWEI,
|
||||
ChampionsEnum.XERATH,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>() { ChampionsEnum.SMOLDER, ChampionsEnum.XERATH }
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.SMOLDER,
|
||||
ChampionsEnum.MORDEKAISER,
|
||||
}
|
||||
),
|
||||
4,
|
||||
new List<long>()
|
||||
@@ -157,12 +182,111 @@ namespace Assets.Data
|
||||
ChampionsEnum.AHRI,
|
||||
ChampionsEnum.POPPY,
|
||||
ChampionsEnum.SORAKA,
|
||||
ChampionsEnum.HWEI,
|
||||
ChampionsEnum.XERATH,
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.RUMBLE,
|
||||
ChampionsEnum.GALIO,
|
||||
ChampionsEnum.AKALI,
|
||||
ChampionsEnum.BARD,
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.MORGANA,
|
||||
ChampionsEnum.FIORA,
|
||||
ChampionsEnum.VARUS,
|
||||
}
|
||||
),
|
||||
7,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.RUMBLE,
|
||||
ChampionsEnum.GALIO,
|
||||
ChampionsEnum.AKALI,
|
||||
ChampionsEnum.BARD,
|
||||
ChampionsEnum.MORGANA,
|
||||
ChampionsEnum.FIORA,
|
||||
ChampionsEnum.VARUS
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.RUMBLE,
|
||||
ChampionsEnum.GALIO,
|
||||
ChampionsEnum.AKALI,
|
||||
ChampionsEnum.BARD,
|
||||
ChampionsEnum.MORGANA,
|
||||
ChampionsEnum.FIORA,
|
||||
ChampionsEnum.VARUS
|
||||
}
|
||||
),
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.XERATH
|
||||
}
|
||||
),
|
||||
7,
|
||||
new List<long>()
|
||||
{
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.RUMBLE,
|
||||
ChampionsEnum.GALIO,
|
||||
ChampionsEnum.AKALI,
|
||||
ChampionsEnum.BARD,
|
||||
ChampionsEnum.MORGANA,
|
||||
ChampionsEnum.FIORA,
|
||||
ChampionsEnum.VARUS
|
||||
}
|
||||
),
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable TestFilteringChampCombination
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.BLITZCRANK,
|
||||
ChampionsEnum.ELISE,
|
||||
ChampionsEnum.JAX
|
||||
}
|
||||
),
|
||||
0b0101,
|
||||
ChampionUtils.ToLong(
|
||||
new HashSet<ChampionsEnum>()
|
||||
{
|
||||
ChampionsEnum.ASHE,
|
||||
ChampionsEnum.ELISE
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user