-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
121 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Lumina.Excel.GeneratedSheets; | ||
using XIVCalc.Interfaces; | ||
|
||
namespace XIVCalc.Tests; | ||
|
||
public class JobStatMock : IJobStatBlock | ||
{ | ||
public ClassJob Job { get; init; } = new ClassJob(); | ||
public int Level { get; init; } | ||
public int WeaponDamage { get;init; } | ||
public int WeaponDelay { get; init;} | ||
public int Vitality { get; init;} | ||
public int Strength { get; init;} | ||
public int Dexterity { get; init;} | ||
public int Intelligence { get; init;} | ||
public int Mind { get; init;} | ||
public int PhysicalDefense { get; init;} | ||
public int MagicalDefense { get; init;} | ||
public int AttackPower { get; init;} | ||
public int AttackMagicPotency { get; init;} | ||
public int HealingMagicPotency { get; init;} | ||
public int DirectHit { get; init;} | ||
public int CriticalHit { get; init;} | ||
public int Determination { get; init;} | ||
public int SkillSpeed { get; init;} | ||
public int SpellSpeed { get; init;} | ||
public int Piety { get; init;} | ||
public int Tenacity { get; init;} | ||
} |
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,42 @@ | ||
using Lumina.Excel.GeneratedSheets; | ||
using XIVCalc.Calculations; | ||
|
||
namespace XIVCalc.Tests; | ||
|
||
public class SimpleTests | ||
{ | ||
private ClassJob WHM = new ClassJob() | ||
{ | ||
ModifierStrength = 55, | ||
ModifierDexterity = 105, | ||
ModifierIntelligence = 105, | ||
ModifierMind = 115, | ||
ModifierVitality = 100, | ||
ModifierHitPoints = 105, | ||
PrimaryStat = (byte) StatType.Mind, | ||
}; | ||
|
||
[SetUp] | ||
public void Setup() | ||
{ | ||
} | ||
|
||
[Test] | ||
public void MainStatMulti() | ||
{ | ||
Assert.Multiple(() => | ||
{ | ||
Assert.That(StatEquations.MainStatMultiplier(440, 100, WHM), Is.EqualTo(1d)); | ||
Assert.That(StatEquations.MainStatMultiplier(452, 100, WHM), Is.EqualTo(1.06)); | ||
Assert.That(StatEquations.MainStatMultiplier(531, 100, WHM), Is.EqualTo( 1.49)); | ||
Assert.That(StatEquations.MainStatMultiplier(555, 100, WHM), Is.EqualTo( 1.61)); | ||
Assert.That(StatEquations.MainStatMultiplier(629, 100, WHM), Is.EqualTo( 2.01)); | ||
}); | ||
} | ||
|
||
[Test] | ||
public void TestBasicStats() | ||
{ | ||
Assert.Pass(); | ||
} | ||
} |
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,29 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0"/> | ||
<PackageReference Include="Lumina.Excel" Version="7.0.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/> | ||
<PackageReference Include="NUnit" Version="3.14.0"/> | ||
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Using Include="NUnit.Framework"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\XIVCalc\XIVCalc.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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