Example #1
0
        public void GeoNames_NearbyPostalCode_StringProperties_ShouldBeConvertedToNull_WhenEmptyOrWhiteSpace()
        {
            var model = new NearbyPostalCode
            {
                Admin1Code = "   ",
                Admin1Name = "   ",
                Admin2Code = "   ",
                Admin2Name = "   ",
                Admin3Code = "   ",
                Admin3Name = "   ",
                CountryCode = "   ",
                Name = "   ",
                Value = "   ",
            };

            model.ShouldNotBeNull();
            model.Admin1Name.ShouldBeNull();
            model.Admin1Code.ShouldBeNull();
            model.Admin2Name.ShouldBeNull();
            model.Admin2Code.ShouldBeNull();
            model.Admin3Name.ShouldBeNull();
            model.Admin3Code.ShouldBeNull();
            model.CountryCode.ShouldBeNull();
            model.Name.ShouldBeNull();
            model.Value.ShouldBeNull();
        }
Example #2
0
        public void GeoNames_NearbyPostalCode_StringProperties_ShouldBeConvertedToNull_WhenEmptyOrWhiteSpace()
        {
            var model = new NearbyPostalCode
            {
                Admin1Code  = "   ",
                Admin1Name  = "   ",
                Admin2Code  = "   ",
                Admin2Name  = "   ",
                Admin3Code  = "   ",
                Admin3Name  = "   ",
                CountryCode = "   ",
                Name        = "   ",
                Value       = "   ",
            };

            model.ShouldNotBeNull();
            model.Admin1Name.ShouldBeNull();
            model.Admin1Code.ShouldBeNull();
            model.Admin2Name.ShouldBeNull();
            model.Admin2Code.ShouldBeNull();
            model.Admin3Name.ShouldBeNull();
            model.Admin3Code.ShouldBeNull();
            model.CountryCode.ShouldBeNull();
            model.Name.ShouldBeNull();
            model.Value.ShouldBeNull();
        }
Example #3
0
        public void GeoNames_NearbyPostalCode_ShouldOverrideToString()
        {
            var model = new NearbyPostalCode
            {
                Value = "85254",
            };

            model.ShouldNotBeNull();
            model.ToString().ShouldEqual(model.Value);
        }
Example #4
0
        public void GeoNames_NearbyPostalCode_ShouldOverrideToString()
        {
            var model = new NearbyPostalCode
            {
                Value = "85254",
            };

            model.ShouldNotBeNull();
            model.ToString().ShouldEqual(model.Value);
        }
Example #5
0
        public void GeoNames_NearbyPostalCode_ShouldBePublic()
        {
            var model = new NearbyPostalCode();

            model.ShouldNotBeNull();
        }
Example #6
0
        public void GeoNames_NearbyPostalCode_ShouldBePublic()
        {
            var model = new NearbyPostalCode();

            model.ShouldNotBeNull();
        }