[Fix] Naming
This commit is contained in:
@@ -11,12 +11,12 @@ namespace YachtDice.Tests
|
||||
{
|
||||
public class ModifierEffectTests
|
||||
{
|
||||
private CategoryDefinitionSO testCategory;
|
||||
private CategoryDefinition testCategory;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
testCategory = SumAllCategorySO.CreateForTest("chance", "Шанс");
|
||||
testCategory = SumAllCategory.CreateForTest("chance", "Шанс");
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
@@ -18,12 +18,12 @@ namespace YachtDice.Tests
|
||||
private ModifierPipeline pipeline;
|
||||
|
||||
// Тестовые категории
|
||||
private CategoryDefinitionSO chanceCategory;
|
||||
private CategoryDefinitionSO fullHouseCategory;
|
||||
private CategoryDefinitionSO onesCategory;
|
||||
private CategoryDefinitionSO threesCategory;
|
||||
private CategoryDefinitionSO foursCategory;
|
||||
private CategoryDefinitionSO sixesCategory;
|
||||
private CategoryDefinition chanceCategory;
|
||||
private CategoryDefinition fullHouseCategory;
|
||||
private CategoryDefinition onesCategory;
|
||||
private CategoryDefinition threesCategory;
|
||||
private CategoryDefinition foursCategory;
|
||||
private CategoryDefinition sixesCategory;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
@@ -32,12 +32,12 @@ namespace YachtDice.Tests
|
||||
pipeline = new ModifierPipeline(registry);
|
||||
pipeline.TracingEnabled = false;
|
||||
|
||||
chanceCategory = SumAllCategorySO.CreateForTest("chance", "Шанс");
|
||||
fullHouseCategory = FullHouseCategorySO.CreateForTest("full_house", "Фулл-хаус");
|
||||
onesCategory = SumOfValueCategorySO.CreateForTest("ones", "Единицы", 1);
|
||||
threesCategory = SumOfValueCategorySO.CreateForTest("threes", "Тройки", 3);
|
||||
foursCategory = SumOfValueCategorySO.CreateForTest("fours", "Четвёрки", 4);
|
||||
sixesCategory = SumOfValueCategorySO.CreateForTest("sixes", "Шестёрки", 6);
|
||||
chanceCategory = SumAllCategory.CreateForTest("chance", "Шанс");
|
||||
fullHouseCategory = FullHouseCategory.CreateForTest("full_house", "Фулл-хаус");
|
||||
onesCategory = SumOfValueCategory.CreateForTest("ones", "Единицы", 1);
|
||||
threesCategory = SumOfValueCategory.CreateForTest("threes", "Тройки", 3);
|
||||
foursCategory = SumOfValueCategory.CreateForTest("fours", "Четвёрки", 4);
|
||||
sixesCategory = SumOfValueCategory.CreateForTest("sixes", "Шестёрки", 6);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
@@ -67,7 +67,7 @@ namespace YachtDice.Tests
|
||||
registry.TryActivate(inst);
|
||||
}
|
||||
|
||||
private ModifierContext CreateScoringContext(int baseScore, int[] dice, CategoryDefinitionSO category)
|
||||
private ModifierContext CreateScoringContext(int baseScore, int[] dice, CategoryDefinition category)
|
||||
{
|
||||
return new ModifierContext
|
||||
{
|
||||
|
||||
@@ -9,11 +9,11 @@ namespace YachtDice.Tests
|
||||
{
|
||||
public class ScoringSystemTests
|
||||
{
|
||||
private CategoryDefinitionSO yachtCategory;
|
||||
private CategoryDefinitionSO onesCategory;
|
||||
private CategoryDefinitionSO twosCategory;
|
||||
private CategoryDefinitionSO chanceCategory;
|
||||
private CategoryCatalogSO catalog;
|
||||
private CategoryDefinition yachtCategory;
|
||||
private CategoryDefinition onesCategory;
|
||||
private CategoryDefinition twosCategory;
|
||||
private CategoryDefinition chanceCategory;
|
||||
private CategoryCatalog catalog;
|
||||
private DieDefinitionSO standardDie;
|
||||
|
||||
[SetUp]
|
||||
@@ -21,12 +21,12 @@ namespace YachtDice.Tests
|
||||
{
|
||||
standardDie = DieDefinitionSO.CreateForTest<StandardDieSO>("d6", "d6");
|
||||
|
||||
yachtCategory = NOfAKindCategorySO.CreateForTest("yacht", "Яхта", 5, fixedScoreMode: true, score: 50);
|
||||
onesCategory = SumOfValueCategorySO.CreateForTest("ones", "Единицы", 1);
|
||||
twosCategory = SumOfValueCategorySO.CreateForTest("twos", "Двойки", 2);
|
||||
chanceCategory = SumAllCategorySO.CreateForTest("chance", "Шанс");
|
||||
yachtCategory = NOfAKindCategory.CreateForTest("yacht", "Яхта", 5, fixedScoreMode: true, score: 50);
|
||||
onesCategory = SumOfValueCategory.CreateForTest("ones", "Единицы", 1);
|
||||
twosCategory = SumOfValueCategory.CreateForTest("twos", "Двойки", 2);
|
||||
chanceCategory = SumAllCategory.CreateForTest("chance", "Шанс");
|
||||
|
||||
catalog = CategoryCatalogSO.CreateForTest(new List<CategoryDefinitionSO>
|
||||
catalog = CategoryCatalog.CreateForTest(new List<CategoryDefinition>
|
||||
{
|
||||
onesCategory, twosCategory, yachtCategory, chanceCategory
|
||||
});
|
||||
@@ -77,7 +77,7 @@ namespace YachtDice.Tests
|
||||
public void ScoreCategory_FiresOnCategoryConfirmed()
|
||||
{
|
||||
var system = CreateScoringSystem();
|
||||
CategoryDefinitionSO firedCategory = null;
|
||||
CategoryDefinition firedCategory = null;
|
||||
ScoreResult firedResult = default;
|
||||
|
||||
system.OnCategoryConfirmed += (cat, res) =>
|
||||
@@ -144,7 +144,7 @@ namespace YachtDice.Tests
|
||||
public void SumOfValueCategory_SumsCorrectly()
|
||||
{
|
||||
var dice = CreateDice(3, 3, 3, 1, 2);
|
||||
var cat = SumOfValueCategorySO.CreateForTest("threes", "Тройки", 3);
|
||||
var cat = SumOfValueCategory.CreateForTest("threes", "Тройки", 3);
|
||||
|
||||
Assert.AreEqual(9, cat.Calculate(dice));
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace YachtDice.Tests
|
||||
[Test]
|
||||
public void NOfAKindCategory_ThreeOfAKind_ReturnsSumOrZero()
|
||||
{
|
||||
var cat = NOfAKindCategorySO.CreateForTest("three_of_a_kind", "Тройка", 3);
|
||||
var cat = NOfAKindCategory.CreateForTest("three_of_a_kind", "Тройка", 3);
|
||||
|
||||
Assert.AreEqual(17, cat.Calculate(CreateDice(4, 4, 4, 3, 2))); // sum = 17
|
||||
Assert.AreEqual(0, cat.Calculate(CreateDice(1, 2, 3, 4, 5))); // no 3-of-a-kind
|
||||
@@ -172,7 +172,7 @@ namespace YachtDice.Tests
|
||||
[Test]
|
||||
public void FullHouseCategory_CalculatesCorrectly()
|
||||
{
|
||||
var cat = FullHouseCategorySO.CreateForTest("fh", "Фулл-хаус", 25);
|
||||
var cat = FullHouseCategory.CreateForTest("fh", "Фулл-хаус", 25);
|
||||
|
||||
Assert.AreEqual(25, cat.Calculate(CreateDice(3, 3, 3, 2, 2)));
|
||||
Assert.AreEqual(0, cat.Calculate(CreateDice(3, 3, 3, 3, 2)));
|
||||
@@ -183,7 +183,7 @@ namespace YachtDice.Tests
|
||||
[Test]
|
||||
public void StraightCategory_SmallStraight()
|
||||
{
|
||||
var cat = StraightCategorySO.CreateForTest("ss", "Малый стрит", 4, 30);
|
||||
var cat = StraightCategory.CreateForTest("ss", "Малый стрит", 4, 30);
|
||||
|
||||
Assert.AreEqual(30, cat.Calculate(CreateDice(1, 2, 3, 4, 6)));
|
||||
Assert.AreEqual(0, cat.Calculate(CreateDice(1, 2, 3, 5, 6)));
|
||||
@@ -194,7 +194,7 @@ namespace YachtDice.Tests
|
||||
[Test]
|
||||
public void StraightCategory_LargeStraight()
|
||||
{
|
||||
var cat = StraightCategorySO.CreateForTest("ls", "Большой стрит", 5, 40);
|
||||
var cat = StraightCategory.CreateForTest("ls", "Большой стрит", 5, 40);
|
||||
|
||||
Assert.AreEqual(40, cat.Calculate(CreateDice(1, 2, 3, 4, 5)));
|
||||
Assert.AreEqual(40, cat.Calculate(CreateDice(2, 3, 4, 5, 6)));
|
||||
|
||||
Reference in New Issue
Block a user