Ejemplo n.º 1
0
        protected void Longitude_ExpectSerializeDoubleToThrowSerializationException_GreaterThanMax()
        {
            // arrange
            ScalarType   scalar      = new LongitudeType();
            const double valueSyntax = 181d;

            // act
            Exception?result = Record.Exception(() => scalar.Serialize(valueSyntax));

            // assert
            Assert.IsType <SerializationException>(result);
        }
Ejemplo n.º 2
0
        protected void Longitude_ExpectSerializeIntToThrowSerializationException_LessThanMin()
        {
            // arrange
            ScalarType scalar      = new LongitudeType();
            const int  valueSyntax = -181;

            // act
            Exception?result = Record.Exception(() => scalar.Serialize(valueSyntax));

            // assert
            Assert.IsType <SerializationException>(result);
        }