Пример #1
0
        public void Can_parse()
        {
            const string sample = "q=mexican%20restaurants";

            // Act
            var result = _host.Parse(sample);

            // Assert
            result.Value.Should().Be("mexican restaurants");
        }
Пример #2
0
        public void Can_parse()
        {
            const string sample = "trfc=1";

            // Act
            var result = _host.Parse(sample);

            // Assert
            result.Value.Should().BeTrue();
        }
Пример #3
0
        public void Can_parse()
        {
            const string sample = "lvl=10.50";

            // Act
            var result = _host.Parse(sample);

            // Assert
            result.Value.Should().Be(10.50m);
        }
Пример #4
0
        public void Can_parse()
        {
            const string sample = "where=1600%20Pennsylvania%20Ave,%20Washington,%20DC";

            // Act
            var result = _host.Parse(sample);

            // Assert
            result.Value.Should().Be("1600 Pennsylvania Ave, Washington, DC");
        }
Пример #5
0
        public void Can_parse()
        {
            const string sample = "cp=40.726966~-74.006076";

            // Act
            var result = _host.Parse(sample);

            // Assert
            result.Latitude.Should().Be(40.726966m);
            result.Longitude.Should().Be(-74.006076m);
        }
Пример #6
0
        public void Can_parse()
        {
            const string sample = "bb=39.719_-74.52~41.71_-73.5";

            // Act
            var result = _host.Parse(sample);

            // Assert
            result.SouthLatitude.Should().Be(39.719m);
            result.WestLatitude.Should().Be(-74.52m);
            result.NorthLongitude.Should().Be(41.71m);
            result.EastLongitude.Should().Be(-73.5m);
        }