Skip to content

Commit

Permalink
Removed surplus tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe-houghton committed Jan 6, 2021
1 parent 5db2908 commit 6ef552c
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions UnitsNet.Tests/CustomCode/ScalarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,6 @@ public class ScalarTests : ScalarTestsBase
// Override properties in base class here
protected override double AmountInOneAmount => 1;
protected override bool SupportsSIUnitSystem => false;

/// <summary>
/// Purposely did not call it an Int as it is not an int underneath.
/// </summary>
[Fact]
public void ScalarWholeNumberEqualsScalarWholeNumber()
{
int i = 1;
var scalar = Scalar.FromAmount(i);
Assert.Equal(i, scalar.Amount);
var scalar2 = Scalar.FromAmount(1000000000);
Assert.Equal(1000000000, scalar2.Amount);
}

[Fact]
public void ScalarDoubleEqualsScalarDouble()
{
var scalar = Scalar.FromAmount(1.123456789);
IQuantity quantity = scalar;
Assert.Equal(1.123456789, scalar.Amount);
var scalar2 = Scalar.FromAmount(0.0000000012345);
Assert.Equal(0.0000000012345, scalar2.Amount);
}



[Fact]
public void ScalarMathsAddition()
{
var scalar = Scalar.FromAmount(10.111111111);
var scalar2 = Scalar.FromAmount(10.111111111);
var scalar3 = scalar + scalar2;
Assert.Equal(20.222222222, scalar3.Amount);
}




}
}

1 comment on commit 6ef552c

@Joe-houghton
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.