switch set, automatize more of the content without UI change
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Set.Data;
|
||||
|
||||
namespace Assets.Data
|
||||
namespace Tests.Editor
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestTraitsUtils
|
||||
@@ -92,65 +93,46 @@ namespace Assets.Data
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.ARCANA, 1 } },
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.ARCANA, 1 } },
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.ARCANA, 2 } }
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.BATTLEACADEMIA, 1 } },
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.BATTLEACADEMIA, 1 } },
|
||||
new Dictionary<int, int> { { (int)TraitsEnum.BATTLEACADEMIA, 2 } }
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ (int)TraitsEnum.ARCANA, 1 },
|
||||
{ (int)TraitsEnum.DRAGON, 2 },
|
||||
{ (int)TraitsEnum.FROST, 3 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 4 },
|
||||
{ (int)TraitsEnum.PYRO, 5 },
|
||||
{ (int)TraitsEnum.WARRIOR, 6 },
|
||||
{ (int)TraitsEnum.BATTLEACADEMIA, 1 },
|
||||
{ (int)TraitsEnum.CRYSTALGAMBIT, 2 },
|
||||
{ (int)TraitsEnum.LUCHADOR, 3 },
|
||||
{ (int)TraitsEnum.MIGHTYMECH, 4 },
|
||||
{ (int)TraitsEnum.SOULFIGHTER, 5 },
|
||||
{ (int)TraitsEnum.BASTION, 6 },
|
||||
},
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ (int)TraitsEnum.ARCANA, 1 },
|
||||
{ (int)TraitsEnum.DRAGON, 2 },
|
||||
{ (int)TraitsEnum.FROST, 3 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 4 },
|
||||
{ (int)TraitsEnum.PYRO, 5 },
|
||||
{ (int)TraitsEnum.WARRIOR, 6 },
|
||||
{ (int)TraitsEnum.BATTLEACADEMIA, 1 },
|
||||
{ (int)TraitsEnum.CRYSTALGAMBIT, 2 },
|
||||
{ (int)TraitsEnum.LUCHADOR, 3 },
|
||||
{ (int)TraitsEnum.MIGHTYMECH, 4 },
|
||||
{ (int)TraitsEnum.SOULFIGHTER, 5 },
|
||||
{ (int)TraitsEnum.BASTION, 6 },
|
||||
},
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ (int)TraitsEnum.ARCANA, 2 },
|
||||
{ (int)TraitsEnum.DRAGON, 4 },
|
||||
{ (int)TraitsEnum.FROST, 6 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 8 },
|
||||
{ (int)TraitsEnum.PYRO, 10 },
|
||||
{ (int)TraitsEnum.WARRIOR, 12 },
|
||||
{ (int)TraitsEnum.BATTLEACADEMIA, 2 },
|
||||
{ (int)TraitsEnum.CRYSTALGAMBIT, 4 },
|
||||
{ (int)TraitsEnum.LUCHADOR, 6 },
|
||||
{ (int)TraitsEnum.MIGHTYMECH, 8 },
|
||||
{ (int)TraitsEnum.SOULFIGHTER, 10 },
|
||||
{ (int)TraitsEnum.BASTION, 12 },
|
||||
}
|
||||
);
|
||||
/*
|
||||
here is the list of traits :
|
||||
ARCANA,
|
||||
CHRONO,
|
||||
DRAGON,
|
||||
DRUID,
|
||||
ELDRICHT,
|
||||
FAERIE,
|
||||
FROST,
|
||||
HONEYMANCY,
|
||||
PORTAL,
|
||||
PYRO,
|
||||
SUGARCRAFT,
|
||||
WITCHCRAFT,
|
||||
BASTION,
|
||||
BLASTER,
|
||||
HUNTER,
|
||||
INCANTATOR,
|
||||
MAGE,
|
||||
MULTISTRIKER,
|
||||
PRESERVER,
|
||||
SCHOLAR,
|
||||
SHAPESHIFTER,
|
||||
VANGUARD,
|
||||
WARRIOR
|
||||
|
||||
Set 15 traits list:
|
||||
Origins: BATTLEACADEMIA, CRYSTALGAMBIT, LUCHADOR, MIGHTYMECH, MONSTERTRAINER,
|
||||
SOULFIGHTER, STARGUARDIAN, SUPREMECELLS, THECREW, WRAITH, MENTOR,
|
||||
PRODIGY, THECHAMP, STANCEMASTER, ROGUECAPTAIN
|
||||
Classes: BASTION, DUELIST, EDGELORD, EXECUTIONER, HEAVYWEIGHT, JUGGERNAUT,
|
||||
PROTECTOR, SNIPER, SORCERER, STRATEGIST
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -162,19 +144,19 @@ namespace Assets.Data
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ (int)TraitsEnum.ARCANA, 1 },
|
||||
{ (int)TraitsEnum.DRAGON, 2 },
|
||||
{ (int)TraitsEnum.FROST, 3 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 4 },
|
||||
{ (int)TraitsEnum.PYRO, 1 },
|
||||
{ (int)TraitsEnum.WARRIOR, 1 },
|
||||
{ (int)TraitsEnum.BATTLEACADEMIA, 1 },
|
||||
{ (int)TraitsEnum.CRYSTALGAMBIT, 2 },
|
||||
{ (int)TraitsEnum.LUCHADOR, 3 },
|
||||
{ (int)TraitsEnum.MIGHTYMECH, 4 },
|
||||
{ (int)TraitsEnum.SOULFIGHTER, 1 },
|
||||
{ (int)TraitsEnum.BASTION, 1 },
|
||||
},
|
||||
TraitUtils.ToInt(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.DRAGON,
|
||||
TraitsEnum.FROST,
|
||||
TraitsEnum.HONEYMANCY
|
||||
TraitsEnum.CRYSTALGAMBIT,
|
||||
TraitsEnum.LUCHADOR,
|
||||
TraitsEnum.MIGHTYMECH
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -182,19 +164,19 @@ namespace Assets.Data
|
||||
yield return new TestCaseData(
|
||||
new Dictionary<int, int>
|
||||
{
|
||||
{ (int)TraitsEnum.ARCANA, 5 },
|
||||
{ (int)TraitsEnum.FROST, 2 },
|
||||
{ (int)TraitsEnum.HONEYMANCY, 7 },
|
||||
{ (int)TraitsEnum.PYRO, 4 },
|
||||
{ (int)TraitsEnum.WARRIOR, 3 },
|
||||
{ (int)TraitsEnum.BATTLEACADEMIA, 5 },
|
||||
{ (int)TraitsEnum.LUCHADOR, 2 },
|
||||
{ (int)TraitsEnum.STARGUARDIAN, 7 },
|
||||
{ (int)TraitsEnum.SOULFIGHTER, 4 },
|
||||
{ (int)TraitsEnum.BASTION, 3 },
|
||||
},
|
||||
TraitUtils.ToInt(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.HONEYMANCY,
|
||||
TraitsEnum.PYRO,
|
||||
TraitsEnum.WARRIOR,
|
||||
TraitsEnum.BATTLEACADEMIA,
|
||||
TraitsEnum.STARGUARDIAN,
|
||||
TraitsEnum.SOULFIGHTER,
|
||||
TraitsEnum.BASTION
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -214,53 +196,55 @@ namespace Assets.Data
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable traitsToInt
|
||||
public static IEnumerable traitsToInt
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.DRAGON
|
||||
TraitsEnum.BATTLEACADEMIA,
|
||||
TraitsEnum.CRYSTALGAMBIT
|
||||
},
|
||||
1<<0 | 1<<2
|
||||
1 << 0 | 1 << 1
|
||||
);
|
||||
yield return new TestCaseData(
|
||||
new HashSet<TraitsEnum>
|
||||
{
|
||||
TraitsEnum.ARCANA,
|
||||
TraitsEnum.DRAGON,
|
||||
TraitsEnum.FROST,
|
||||
TraitsEnum.HONEYMANCY,
|
||||
TraitsEnum.PYRO,
|
||||
TraitsEnum.WARRIOR
|
||||
TraitsEnum.BATTLEACADEMIA,
|
||||
TraitsEnum.CRYSTALGAMBIT,
|
||||
TraitsEnum.LUCHADOR,
|
||||
TraitsEnum.MIGHTYMECH,
|
||||
TraitsEnum.SOULFIGHTER,
|
||||
TraitsEnum.BASTION
|
||||
},
|
||||
1<<0 | 1<<2 | 1<<6 | 1<<7 | 1<<9 | 1<<22
|
||||
);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.ARCANA},1 << 0);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.CHRONO},1 << 1);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.DRAGON},1 << 2);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.DRUID},1 << 3);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.ELDRICHT},1 << 4);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.FAERIE},1 << 5);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.FROST},1 << 6);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.HONEYMANCY},1 << 7);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.PORTAL},1 << 8);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.PYRO},1 << 9);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.SUGARCRAFT},1 << 10);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.WITCHCRAFT},1 << 11);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.BASTION},1 << 12);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.BLASTER},1 << 13);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.HUNTER},1 << 14);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.INCANTATOR},1 << 15);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.MAGE},1 << 16);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.MULTISTRIKER},1 << 17);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.PRESERVER},1 << 18);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.SCHOLAR},1 << 19);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.SHAPESHIFTER},1 << 20);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.VANGUARD},1 << 21);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum>{TraitsEnum.WARRIOR},1 << 22);
|
||||
1 << 0 | 1 << 1 | 1 << 2 | 1 << 3 | 1 << 5 | 1 << 15
|
||||
);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.BATTLEACADEMIA }, 1 << 0);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.CRYSTALGAMBIT }, 1 << 1);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.LUCHADOR }, 1 << 2);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.MIGHTYMECH }, 1 << 3);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.MONSTERTRAINER }, 1 << 4);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.SOULFIGHTER }, 1 << 5);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.STARGUARDIAN }, 1 << 6);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.SUPREMECELLS }, 1 << 7);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.THECREW }, 1 << 8);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.WRAITH }, 1 << 9);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.MENTOR }, 1 << 10);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.PRODIGY }, 1 << 11);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.THECHAMP }, 1 << 12);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.STANCEMASTER }, 1 << 13);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.ROGUECAPTAIN }, 1 << 14);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.BASTION }, 1 << 15);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.DUELIST }, 1 << 16);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.EDGELORD }, 1 << 17);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.EXECUTIONER }, 1 << 18);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.HEAVYWEIGHT }, 1 << 19);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.JUGGERNAUT }, 1 << 20);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.PROTECTOR }, 1 << 21);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.SNIPER }, 1 << 22);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.SORCERER }, 1 << 23);
|
||||
yield return new TestCaseData(new HashSet<TraitsEnum> { TraitsEnum.STRATEGIST }, 1 << 24);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user