public void Setup() { m_Sut = new SphericalCoordinates { Radius = 1.0, PolarAngle = PolarAngle.FromRadians(Angle.For45Degrees.Radians), AzimuthalAngle = AzimuthAngle.FromRadians(Angle.For90Degrees.Radians), IsUnknown = true }; }
public void OperatorGreaterOrEqualThan_AddsAngles_ForGivenAngles( double oneInDegrees, double twoInDegrees, bool expected) { // Arrange AzimuthAngle one = AzimuthAngle.FromDegrees(oneInDegrees); AzimuthAngle two = AzimuthAngle.FromDegrees(twoInDegrees); // Act // Assert Assert.AreEqual(expected, one >= two); }
public void OperatorMinus_AddsAngles_ForGivenAngles( double oneInDegrees, double twoInDegrees, double expectedInDegrees) { // Arrange AzimuthAngle one = AzimuthAngle.FromDegrees(oneInDegrees); AzimuthAngle two = AzimuthAngle.FromDegrees(twoInDegrees); AzimuthAngle expected = AzimuthAngle.FromDegrees(expectedInDegrees); // Act AzimuthAngle actual = one - two; // Assert NUnitHelper.AssertDegrees(expected.Degrees, actual.Degrees); }
public void FromRadians_CreatesInstanceWithRadians_ForGivenValues( double radians, double expectedRadians) { Console.WriteLine("Testing:"); Console.WriteLine("radians = {0:F6}", radians); Console.WriteLine("expectedRadians = {0:F6}", expectedRadians); // Arrange // Act AzimuthAngle sut = AzimuthAngle.FromRadians(radians); // Assert NUnitHelper.AssertDegrees(expectedRadians, sut.Radians); }