コード例 #1
0
        public void WhenGivenDecimalPosition_ShouldConvertToDegMinSecPosition(double coordinate, bool isNegative, int degrees, int minutes, int seconds, int millisecs)
        {
            GeoCoordinate result = GeoCoordinate.FromDouble(coordinate);

            result.IsNegative.Should().Be(isNegative);
            result.Degrees.Should().Be(degrees);
            result.Minutes.Should().Be(minutes);
            result.Seconds.Should().Be(seconds);
            result.Milliseconds.Should().Be(millisecs);
        }
コード例 #2
0
        public void WhenGivenOutOfRangeDecimalPosition_ShouldReturnNull(double coordinate)
        {
            GeoCoordinate result = GeoCoordinate.FromDouble(coordinate);

            result.Should().BeNull();
        }