Пример #1
0
        protected void Latitude_ExpectSerializeDoubleToThrowSerializationException_GreaterThanMax()
        {
            // arrange
            ScalarType   scalar      = new LatitudeType();
            const double valueSyntax = 91d;

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

            // assert
            Assert.IsType <SerializationException>(result);
        }
Пример #2
0
        protected void Latitude_ExpectSerializeIntToThrowSerializationException_LessThanMin()
        {
            // arrange
            ScalarType scalar      = new LatitudeType();
            const int  valueSyntax = -91;

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

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