final
This commit is contained in:
31
BlueLaminate/BlueLaminate.Tests/Tradeups/WearBandTests.cs
Normal file
31
BlueLaminate/BlueLaminate.Tests/Tradeups/WearBandTests.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using BlueLaminate.Core.Tradeups;
|
||||
using Xunit;
|
||||
|
||||
namespace BlueLaminate.Tests.Tradeups;
|
||||
|
||||
public class WearBandTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(0.00, WearBand.FactoryNew)]
|
||||
[InlineData(0.0699, WearBand.FactoryNew)]
|
||||
[InlineData(0.07, WearBand.MinimalWear)] // boundary is upper-exclusive
|
||||
[InlineData(0.1499, WearBand.MinimalWear)]
|
||||
[InlineData(0.15, WearBand.FieldTested)]
|
||||
[InlineData(0.3799, WearBand.FieldTested)]
|
||||
[InlineData(0.38, WearBand.WellWorn)]
|
||||
[InlineData(0.4499, WearBand.WellWorn)]
|
||||
[InlineData(0.45, WearBand.BattleScarred)]
|
||||
[InlineData(1.00, WearBand.BattleScarred)]
|
||||
public void FromFloat_classifies_on_absolute_thresholds(double value, WearBand expected)
|
||||
{
|
||||
Assert.Equal(expected, WearBands.FromFloat((decimal)value));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ToName_matches_listing_wear_strings()
|
||||
{
|
||||
Assert.Equal("Factory New", WearBand.FactoryNew.ToName());
|
||||
Assert.Equal("Field-Tested", WearBand.FieldTested.ToName());
|
||||
Assert.Equal("Battle-Scarred", WearBand.BattleScarred.ToName());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user