Пример #1
0
 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 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);
        }