Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 5 additions & 25 deletions UnitsNet.Tests/DecimalOverloadTests.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) 2013 Andreas Gullberg Larsen ([email protected]).
// https://github.com/angularsen/UnitsNet
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -20,8 +20,6 @@
// THE SOFTWARE.

using Xunit;
using UnitsNet.Extensions.NumberToAcceleration;
using UnitsNet.Extensions.NumberToPower;

namespace UnitsNet.Tests
{
Expand All @@ -30,32 +28,14 @@ public class DecimalOverloadTests
[Fact]
public static void CreatingQuantityWithDoubleBackingFieldFromDecimalReturnsCorrectValue()
{
decimal oneMeterPerSecondSquared = 1m;
Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(oneMeterPerSecondSquared);
Assert.Equal(1.0, acceleration.MetersPerSecondSquared);
}

[Fact]
public static void CreatingQuantityWithDoubleBackingFieldFromDecimalWithExtensionMethodReturnsCorrectValue()
{
decimal oneMeterPerSecondSquared = 1m;
Acceleration acceleration = oneMeterPerSecondSquared.MetersPerSecondSquared();
Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(1m);
Assert.Equal(1.0, acceleration.MetersPerSecondSquared);
}

[Fact]
public static void CreatingQuantityWithDecimalBackingFieldFromDecimalReturnsCorrectValue()
{
decimal oneWatt = 1m;
Power power = Power.FromWatts(oneWatt);
Assert.Equal(1.0, power.Watts);
}

[Fact]
public static void CreatingQuantityWithDecimalBackingFieldFromDecimalWithExtensionMethodReturnsCorrectValue()
{
decimal oneWatt = 1m;
Power power = oneWatt.Watts();
Power power = Power.FromWatts(1m);
Assert.Equal(1.0, power.Watts);
}
}
Expand Down

This file was deleted.

30 changes: 5 additions & 25 deletions UnitsNet.Tests/IntOverloadTests.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) 2013 Andreas Gullberg Larsen ([email protected]).
// https://github.com/angularsen/UnitsNet
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -20,8 +20,6 @@
// THE SOFTWARE.

using Xunit;
using UnitsNet.Extensions.NumberToAcceleration;
using UnitsNet.Extensions.NumberToPower;

namespace UnitsNet.Tests
{
Expand All @@ -30,32 +28,14 @@ public class IntOverloadTests
[Fact]
public static void CreatingQuantityWithDoubleBackingFieldFromIntReturnsCorrectValue()
{
int oneMeterPerSecondSquared = 1;
Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(oneMeterPerSecondSquared);
Assert.Equal(1.0, acceleration.MetersPerSecondSquared);
}

[Fact]
public static void CreatingQuantityWithDoubleBackingFieldFromIntWithExtensionMethodReturnsCorrectValue()
{
int oneMeterPerSecondSquared = 1;
Acceleration acceleration = oneMeterPerSecondSquared.MetersPerSecondSquared();
Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(1);
Assert.Equal(1.0, acceleration.MetersPerSecondSquared);
}

[Fact]
public static void CreatingQuantityWithIntBackingFieldFromIntReturnsCorrectValue()
{
int oneWatt = 1;
Power power = Power.FromWatts(oneWatt);
Assert.Equal(1.0, power.Watts);
}

[Fact]
public static void CreatingQuantityWithIntBackingFieldFromIntWithExtensionMethodReturnsCorrectValue()
{
int oneWatt = 1;
Power power = oneWatt.Watts();
Power power = Power.FromWatts(1);
Assert.Equal(1.0, power.Watts);
}
}
Expand Down
30 changes: 5 additions & 25 deletions UnitsNet.Tests/LongOverloadTests.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) 2013 Andreas Gullberg Larsen ([email protected]).
// https://github.com/angularsen/UnitsNet
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -20,8 +20,6 @@
// THE SOFTWARE.

using Xunit;
using UnitsNet.Extensions.NumberToAcceleration;
using UnitsNet.Extensions.NumberToPower;

namespace UnitsNet.Tests
{
Expand All @@ -30,32 +28,14 @@ public class LongOverloadTests
[Fact]
public static void CreatingQuantityWithDoubleBackingFieldFromLongReturnsCorrectValue()
{
long oneMeterPerSecondSquared = 1;
Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(oneMeterPerSecondSquared);
Assert.Equal(1.0, acceleration.MetersPerSecondSquared);
}

[Fact]
public static void CreatingQuantityWithDoubleBackingFieldFromLongWithExtensionMethodReturnsCorrectValue()
{
long oneMeterPerSecondSquared = 1;
Acceleration acceleration = oneMeterPerSecondSquared.MetersPerSecondSquared();
Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(1L);
Assert.Equal(1.0, acceleration.MetersPerSecondSquared);
}

[Fact]
public static void CreatingQuantityWithLongBackingFieldFromLongReturnsCorrectValue()
{
long oneWatt = 1;
Power power = Power.FromWatts(oneWatt);
Assert.Equal(1.0, power.Watts);
}

[Fact]
public static void CreatingQuantityWithLongBackingFieldFromLongWithExtensionMethodReturnsCorrectValue()
{
long oneWatt = 1;
Power power = oneWatt.Watts();
Power power = Power.FromWatts(1L);
Assert.Equal(1.0, power.Watts);
}
}
Expand Down
41 changes: 0 additions & 41 deletions UnitsNet.Tests/NumberExtensionsTest.cs

This file was deleted.

Loading