public void AcceptsValidMobileNumberContainingWhitespace( )
        {
            // arrange
            var number = "41 11 11 11";
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Mobile );

            // assert
            Assert.AreEqual( true , result );
        }
        public void AcceptsValidGeographicNumberContainingWhitespace( )
        {
            // arrange
            var number = "66 66 66 66";
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Geographic );

            // assert
            Assert.AreEqual( true , result );
        }
        public void AcceptsValidGeographicNumberWhenFilteringForMobileNumbersToo( )
        {
            // arrange
            var number = ValidGeographicNumber;
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Mobile | NumberPlanValidatorMask.Geographic );

            // assert
            Assert.AreEqual( true , result );
        }
        public void ValidateSpecialNumber( string number )
        {
            // arrange
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Special );

            // assert
            Assert.AreEqual( true , result );
        }
        public void RejectsInvalidMobileNumber( )
        {
            // arrange
            var number = InvalidMobileNumber;
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Mobile );

            // assert
            Assert.AreEqual( false , result );
        }
        public void DetectsTwelveDigitM2MNumber( )
        {
            // arrange
            var number = "581 111 111 111";
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Mobile | NumberPlanValidatorMask.Geographic );

            // assert
            Assert.AreEqual( true , result );
        }
        public void DetectsEmergencyServiceNumbers( string number )
        {
            // arrange
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.Special );

            // assert
            Assert.AreEqual( true , result );
        }
        public void AcceptsValidNonGeographicNumber( )
        {
            // arrange
            var number = "06001";
            var validator = new NorwegianNumberPlanValidator( );

            // act
            var result = validator.IsValid( number , NumberPlanValidatorMask.NonGeographic );

            // assert
            Assert.AreEqual( true , result );
        }