Exemplo n.º 1
0
        public void SetCountryHasCountryGetCountry()
        {
            CountryCityStateLocationSearchParams locParams = new CountryCityStateLocationSearchParams();

            locParams.Country = "United States";

            Assert.True(locParams.IsFieldSet("Country"));
            Assert.False(locParams.IsFieldSet("City"));
            Assert.False(locParams.IsFieldSet("State"));
            Assert.Equal("United States", locParams.GetFieldAsString("Country"));
        }
Exemplo n.º 2
0
        public void SetCityHasCityGetCity()
        {
            CountryCityStateLocationSearchParams locParams = new CountryCityStateLocationSearchParams();

            locParams.City = "Baltimore";

            Assert.True(locParams.IsFieldSet("City"));
            Assert.False(locParams.IsFieldSet("State"));
            Assert.False(locParams.IsFieldSet("Country"));
            Assert.Equal("Baltimore", locParams.GetFieldAsString("City"));
        }
Exemplo n.º 3
0
        public void SetStateHasStateGetState()
        {
            CountryCityStateLocationSearchParams locParams = new CountryCityStateLocationSearchParams();

            locParams.State = new LabelledSearchParam[]
            {
                new LabelledSearchParam()
                {
                    Key   = "MD",
                    Label = "Maryland"
                }
            };

            Assert.True(locParams.IsFieldSet("State"));
            Assert.False(locParams.IsFieldSet("City"));
            Assert.False(locParams.IsFieldSet("Country"));
            Assert.Equal("Maryland", locParams.GetFieldAsString("State"));
        }