-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from PoESkillTree/passive-skill-tree
Passive Skill Tree Support
- Loading branch information
Showing
35 changed files
with
1,690 additions
and
29 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
PoESkillTree.Engine.GameModel.IntegrationTests/Data/skilltree_3.10.0.new.min.json
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
PoESkillTree.Engine.GameModel.IntegrationTests/Data/skilltree_3.10.0.old.min.json
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
PoESkillTree.Engine.GameModel.IntegrationTests/Data/skilltree_3.8.0.min.json
Large diffs are not rendered by default.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
PoESkillTree.Engine.GameModel.IntegrationTests/PassiveTree/PassiveTreeDeserializationTest.cs
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,30 @@ | ||
using FluentAssertions; | ||
using Newtonsoft.Json; | ||
using NUnit.Framework; | ||
using PoESkillTree.Engine.GameModel.PassiveTree.Base; | ||
|
||
namespace PoESkillTree.Engine.GameModel.PassiveTree | ||
{ | ||
[TestFixture] | ||
public class PassiveTreeDeserializationTest | ||
{ | ||
[TestCase("skilltree_3.10.0.new.min.json")] | ||
[TestCase("skilltree_3.10.0.old.min.json")] | ||
[TestCase("skilltree_3.8.0.min.json")] | ||
public void JsonPassiveTree_Deserialization_Serialization_Deserialization(string fileName) | ||
{ | ||
var orignalJson = TestUtils.ReadDataFile(fileName); | ||
Assert.IsNotEmpty(orignalJson); | ||
|
||
var deserialized1 = JsonConvert.DeserializeObject<JsonPassiveTree>(orignalJson); | ||
var serialized1 = JsonConvert.SerializeObject(deserialized1); | ||
Assert.IsNotEmpty(serialized1); | ||
|
||
var deserialized2 = JsonConvert.DeserializeObject<JsonPassiveTree>(serialized1); | ||
var serialized2 = JsonConvert.SerializeObject(deserialized2); | ||
Assert.IsNotEmpty(serialized2); | ||
|
||
serialized1.Should().BeEquivalentTo(serialized2); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...e.Engine.GameModel.IntegrationTests/PoESkillTree.Engine.GameModel.IntegrationTests.csproj
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,34 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<RootNamespace>PoESkillTree.Engine.GameModel</RootNamespace> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<LangVersion>8</LangVersion> | ||
<AssemblyTitle>PoESkillTree.Engine.GameModel.IntegrationTests</AssemblyTitle> | ||
<Product>PoESkillTree.Engine.GameModel.IntegrationTests</Product> | ||
<Copyright>Copyright © 2018</Copyright> | ||
<IsPackable>False</IsPackable> | ||
<Nullable>enable</Nullable> | ||
<WarningsAsErrors>8600;8601;8602;8603;8604;8619;8620</WarningsAsErrors> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="FluentAssertions" Version="5.9.0" /> | ||
<PackageReference Include="Moq" Version="4.13.1" /> | ||
<PackageReference Include="morelinq" Version="3.2.0" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||
<PackageReference Include="NUnit" Version="3.12.0" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="Data\*.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\PoESkillTree.Engine.GameModel\PoESkillTree.Engine.GameModel.csproj" /> | ||
<ProjectReference Include="..\PoESkillTree.Engine.Utils\PoESkillTree.Engine.Utils.csproj" /> | ||
</ItemGroup> | ||
</Project> |
14 changes: 14 additions & 0 deletions
14
PoESkillTree.Engine.GameModel.IntegrationTests/TestUtils.cs
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,14 @@ | ||
using System.IO; | ||
using NUnit.Framework; | ||
|
||
namespace PoESkillTree.Engine.GameModel | ||
{ | ||
public static class TestUtils | ||
{ | ||
public static string ReadDataFile(string fileName) | ||
=> File.ReadAllText(GetDataFilePath(fileName)); | ||
|
||
public static string GetDataFilePath(string filename) | ||
=> TestContext.CurrentContext.TestDirectory + "/Data/" + filename; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
PoESkillTree.Engine.GameModel.Tests/PassiveTree/Base/JsonPassiveNodeGroupTest.cs
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,24 @@ | ||
using NUnit.Framework; | ||
|
||
namespace PoESkillTree.Engine.GameModel.PassiveTree.Base | ||
{ | ||
public class JsonPassiveNodeGroupTest | ||
{ | ||
[TestCase(0, 0, 0.3835f)] | ||
[TestCase(0, 1, 0.3835f)] | ||
[TestCase(1, 0, 0.3835f)] | ||
[TestCase(1, 1, 0.3835f)] | ||
public void JsonPassiveNodeGroup_Position(float x, float y, float zoomLevel) | ||
{ | ||
var group = new JsonPassiveNodeGroup() | ||
{ | ||
OriginalX = x, | ||
OriginalY = y, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
Assert.AreEqual(x * zoomLevel, group.Position.X); | ||
Assert.AreEqual(y * zoomLevel, group.Position.Y); | ||
} | ||
} | ||
} |
183 changes: 183 additions & 0 deletions
183
PoESkillTree.Engine.GameModel.Tests/PassiveTree/Base/JsonPassiveNodeTest.cs
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,183 @@ | ||
using NUnit.Framework; | ||
using System; | ||
|
||
namespace PoESkillTree.Engine.GameModel.PassiveTree.Base | ||
{ | ||
public class JsonPassiveNodeTest | ||
{ | ||
[TestCase(CharacterClass.Scion)] | ||
[TestCase(CharacterClass.Marauder)] | ||
[TestCase(CharacterClass.Ranger)] | ||
[TestCase(CharacterClass.Witch)] | ||
[TestCase(CharacterClass.Duelist)] | ||
[TestCase(CharacterClass.Templar)] | ||
[TestCase(CharacterClass.Shadow)] | ||
[TestCase(null)] | ||
public void JsonPassiveNode_StartingCharacterClass(CharacterClass? characterClass) | ||
{ | ||
var node = new JsonPassiveNode() | ||
{ | ||
StartingCharacterClass = characterClass | ||
}; | ||
|
||
Assert.AreEqual(characterClass.HasValue, node.IsRootNode); | ||
Assert.AreEqual(characterClass, node.StartingCharacterClass); | ||
} | ||
|
||
[TestCase("", ExpectedResult = false)] | ||
[TestCase("testing", ExpectedResult = true)] | ||
public bool JsonPassiveNode_IsAscendancyNode(string ascendancyName) | ||
{ | ||
var node = new JsonPassiveNode | ||
{ | ||
AscendancyName = ascendancyName | ||
}; | ||
|
||
return node.IsAscendancyNode; | ||
} | ||
|
||
[TestCase(PassiveNodeType.Keystone, ExpectedResult = PassiveNodeType.Keystone)] | ||
[TestCase(PassiveNodeType.Mastery, ExpectedResult = PassiveNodeType.Mastery)] | ||
[TestCase(PassiveNodeType.Notable, ExpectedResult = PassiveNodeType.Notable)] | ||
[TestCase(PassiveNodeType.JewelSocket, ExpectedResult = PassiveNodeType.JewelSocket)] | ||
[TestCase(PassiveNodeType.Small, ExpectedResult = PassiveNodeType.Small)] | ||
[TestCase(PassiveNodeType.Keystone | PassiveNodeType.Mastery | PassiveNodeType.Notable | PassiveNodeType.JewelSocket | PassiveNodeType.Small, ExpectedResult = PassiveNodeType.Small)] | ||
[TestCase(42, ExpectedResult = PassiveNodeType.Small)] | ||
public PassiveNodeType JsonPassiveNode_PassiveNodeType(PassiveNodeType passiveNodeType) | ||
{ | ||
var node = new JsonPassiveNode | ||
{ | ||
IsKeystone = passiveNodeType == PassiveNodeType.Keystone, | ||
IsMastery = passiveNodeType == PassiveNodeType.Mastery, | ||
IsNotable = passiveNodeType == PassiveNodeType.Notable, | ||
IsJewelSocket = passiveNodeType == PassiveNodeType.JewelSocket, | ||
}; | ||
|
||
return node.PassiveNodeType; | ||
} | ||
|
||
[TestCase(0, new[] { 1f })] | ||
[TestCase(1, new[] { 1f, 2f })] | ||
public void JsonPassiveNode_Arc(int skillsPerOrbitIndex, float[] skillsPerOrbit) | ||
{ | ||
var node = new JsonPassiveNode | ||
{ | ||
SkillsPerOrbitIndex = skillsPerOrbitIndex, | ||
SkillsPerOrbit = skillsPerOrbit, | ||
}; | ||
|
||
Assert.AreEqual(2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex], node.Arc); | ||
} | ||
|
||
[TestCase(0, 0, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(0, 1, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(1, 0, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(1, 1, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(500, 250, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 500, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(500, 500, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 250, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 250, 0.3835f, 0, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
public void JsonPassiveNode_Position(float x, float y, float zoomLevel, int orbitRadiiIndex, float[] orbitRadii, int skillsPerOrbitIndex, float[] skillsPerOrbit) | ||
{ | ||
var group = new JsonPassiveNodeGroup | ||
{ | ||
OriginalX = x, | ||
OriginalY = y, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
var node = new JsonPassiveNode | ||
{ | ||
PassiveNodeGroup = group, | ||
OrbitRadiiIndex = orbitRadiiIndex, | ||
OrbitRadii = orbitRadii, | ||
SkillsPerOrbitIndex = skillsPerOrbitIndex, | ||
SkillsPerOrbit = skillsPerOrbit, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
Assert.AreEqual(group.Position.X - orbitRadii[orbitRadiiIndex] * zoomLevel * (float)Math.Sin(-2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex]), node.Position.X); | ||
Assert.AreEqual(group.Position.Y - orbitRadii[orbitRadiiIndex] * zoomLevel * (float)Math.Cos(-2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex]), node.Position.Y); | ||
} | ||
|
||
[TestCase(0, 0, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(0, 1, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(1, 0, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(1, 1, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(500, 250, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 500, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(500, 500, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 250, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 250, 0.3835f, 0, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
public void JsonPassiveNode_Convert(float _x, float _y, float zoomLevel, int orbitRadiiIndex, float[] orbitRadii, int skillsPerOrbitIndex, float[] skillsPerOrbit) | ||
{ | ||
var group = new JsonPassiveNodeGroup | ||
{ | ||
OriginalX = _x, | ||
OriginalY = _y, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
var node = new JsonPassiveNode | ||
{ | ||
PassiveNodeGroup = group, | ||
OrbitRadiiIndex = orbitRadiiIndex, | ||
OrbitRadii = orbitRadii, | ||
SkillsPerOrbitIndex = skillsPerOrbitIndex, | ||
SkillsPerOrbit = skillsPerOrbit, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
var nodeDefinition = PassiveNodeDefinition.Convert(node); | ||
var nodePosition = node.PositionAtZoomLevel(1f); | ||
Assert.AreEqual(nodePosition.X, nodeDefinition.Position.X); | ||
Assert.AreEqual(nodePosition.Y, nodeDefinition.Position.Y); | ||
} | ||
|
||
[TestCase(0, 0, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(0, 1, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(1, 0, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(1, 1, 0.3835f, 0, new[] { 0f }, 0, new[] { 1f })] | ||
[TestCase(500, 250, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 500, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(500, 500, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 250, 0.3835f, 1, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
[TestCase(250, 250, 0.3835f, 0, new[] { 0f, 82f }, 1, new[] { 1f, 2f })] | ||
public void JsonPassiveNode_ClearPosition(float x, float y, float zoomLevel, int orbitRadiiIndex, float[] orbitRadii, int skillsPerOrbitIndex, float[] skillsPerOrbit) | ||
{ | ||
var group = new JsonPassiveNodeGroup | ||
{ | ||
OriginalX = x, | ||
OriginalY = y, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
var node = new JsonPassiveNode | ||
{ | ||
PassiveNodeGroup = group, | ||
OrbitRadiiIndex = orbitRadiiIndex, | ||
OrbitRadii = orbitRadii, | ||
SkillsPerOrbitIndex = skillsPerOrbitIndex, | ||
SkillsPerOrbit = skillsPerOrbit, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
Assert.AreEqual(group.Position.X - orbitRadii[orbitRadiiIndex] * zoomLevel * (float)Math.Sin(-2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex]), node.Position.X); | ||
Assert.AreEqual(group.Position.Y - orbitRadii[orbitRadiiIndex] * zoomLevel * (float)Math.Cos(-2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex]), node.Position.Y); | ||
|
||
var newGroup = new JsonPassiveNodeGroup | ||
{ | ||
OriginalX = x * 10, | ||
OriginalY = y * 10, | ||
ZoomLevel = zoomLevel, | ||
}; | ||
|
||
node.PassiveNodeGroup = newGroup; | ||
node.ClearPositionCache(); | ||
|
||
Assert.AreEqual(newGroup.Position.X - orbitRadii[orbitRadiiIndex] * zoomLevel * (float)Math.Sin(-2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex]), node.Position.X); | ||
Assert.AreEqual(newGroup.Position.Y - orbitRadii[orbitRadiiIndex] * zoomLevel * (float)Math.Cos(-2 * Math.PI * skillsPerOrbitIndex / skillsPerOrbit[skillsPerOrbitIndex]), node.Position.Y); | ||
} | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
PoESkillTree.Engine.GameModel.Tests/PassiveTree/Base/JsonPassiveTreeAscendancyClassTest.cs
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,88 @@ | ||
using Newtonsoft.Json; | ||
using NUnit.Framework; | ||
using System.Drawing; | ||
|
||
namespace PoESkillTree.Engine.GameModel.PassiveTree.Base | ||
{ | ||
public class JsonPassiveTreeAscendancyClassTest | ||
{ | ||
[TestCase(25f, 25f, 50f, 50f)] | ||
[TestCase(0.25f, 0.50f, 150f, 50f)] | ||
[TestCase(0.50f, 0.25f, 100f, 50f)] | ||
public void JsonAscendancyClassOption_FlavourTextBounds(float x, float y, float width, float height) | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{\"flavourTextRect\": {{ \"x\": {x},\"y\": {y},\"width\": {width},\"height\": {height} }}}}"); | ||
|
||
Assert.AreEqual(x, ascendancy.FlavourTextBounds.X); | ||
Assert.AreEqual(y, ascendancy.FlavourTextBounds.Y); | ||
Assert.AreEqual(width, ascendancy.FlavourTextBounds.Width); | ||
Assert.AreEqual(height, ascendancy.FlavourTextBounds.Height); | ||
} | ||
|
||
[TestCase(25f, 25f, 50f, 50f)] | ||
[TestCase(0.25f, 0.50f, 150f, 50f)] | ||
[TestCase(0.50f, 0.25f, 100f, 50f)] | ||
public void JsonAscendancyClassOption_FlavourTextBounds_Old(float x, float y, float width, float height) | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{\"flavourTextRect\": \"{x},{y},{width},{height}\" }}"); | ||
|
||
Assert.AreEqual(x, ascendancy.FlavourTextBounds.X); | ||
Assert.AreEqual(y, ascendancy.FlavourTextBounds.Y); | ||
Assert.AreEqual(width, ascendancy.FlavourTextBounds.Width); | ||
Assert.AreEqual(height, ascendancy.FlavourTextBounds.Height); | ||
} | ||
|
||
[Test] | ||
public void JsonAscendancyClassOption_FlavourTextBounds_Empty() | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{ \"flavourTextRect\": {{ }} }}"); | ||
|
||
Assert.AreEqual(RectangleF.Empty, ascendancy.FlavourTextBounds); | ||
} | ||
|
||
[TestCase("50,50,50,50,50")] | ||
[TestCase("50,50,50")] | ||
[TestCase("50,50")] | ||
[TestCase("50")] | ||
[TestCase("")] | ||
public void JsonAscendancyClassOption_FlavourTextBounds_Empty_Old(string boundsString) | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{\"flavourTextRect\": \"{boundsString}\" }}"); | ||
|
||
Assert.AreEqual(RectangleF.Empty, ascendancy.FlavourTextBounds); | ||
} | ||
|
||
[TestCase("128,128,128")] | ||
[TestCase("128128")] | ||
[TestCase("128")] | ||
public void JsonAscendancyClassOption_FlavourTextColour_IsNotEmpty(string colourString) | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{\"flavourTextColour\": \"{colourString}\" }}"); | ||
|
||
Assert.AreNotEqual(Color.Empty, ascendancy.FlavourTextColour); | ||
} | ||
|
||
[TestCase(128, 128, 128)] | ||
[TestCase(128, 128, 128)] | ||
[TestCase(128, 128, 128)] | ||
public void JsonAscendancyClassOption_FlavourTextColour_Old(byte red, byte green, byte blue) | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{\"flavourTextColour\": \"{red},{green},{blue}\" }}"); | ||
|
||
Assert.IsNotNull(ascendancy.FlavourTextColour); | ||
Assert.AreEqual(red, ascendancy.FlavourTextColour.R); | ||
Assert.AreEqual(green, ascendancy.FlavourTextColour.G); | ||
Assert.AreEqual(blue, ascendancy.FlavourTextColour.B); | ||
} | ||
|
||
[TestCase("128,128,128,128")] | ||
[TestCase("128,128")] | ||
[TestCase("")] | ||
public void JsonAscendancyClassOption_FlavourTextColour_IsEmpty(string colourString) | ||
{ | ||
var ascendancy = JsonConvert.DeserializeObject<JsonPassiveTreeAscendancyClass>($"{{\"flavourTextColour\": \"{colourString}\" }}"); | ||
|
||
Assert.AreEqual(Color.Empty, ascendancy.FlavourTextColour); | ||
} | ||
} | ||
} |
Oops, something went wrong.