public void ShouldDeserialiseObjectToStringRepresentation()
 {
     var p = new TestGeoPointOutParameters()
     {
         BBox = "[2.123, -3.213234] [2.123, -3.213234]",
         Point = "2.1,3.4"
     };
     var json = JsonConvert.SerializeObject(p);
     var p2 = JsonConvert.DeserializeObject<TestGeoPointParameters>(json);
 }
 public void ShouldDeserialiseGeoPointToGeoPoint()
 {
     var p = new TestGeoPointOutParameters()
     {
         Point = "2.1,3.4"
     };
     var json = JsonConvert.SerializeObject(p);
     var p2 = JsonConvert.DeserializeObject<TestGeoPointOutParameters>(json);
     p2.Point.Should().Be(p.Point);
 }
        public void ShouldDeserialiseGeoPointToGeoPoint()
        {
            var p = new TestGeoPointOutParameters()
            {
                Point = "2.1,3.4"
            };
            var json = JsonConvert.SerializeObject(p);
            var p2   = JsonConvert.DeserializeObject <TestGeoPointOutParameters>(json);

            p2.Point.Should().Be(p.Point);
        }
 public void ShouldDeserialiseGeoBoundingBoxToGeoBoundingBox()
 {
     var p = new TestGeoPointOutParameters()
     {
         BBox = "[2.123, -3.213234] [2.123, -3.213234]"
     };
     var json = JsonConvert.SerializeObject(p);
     var p2 = JsonConvert.DeserializeObject<TestGeoPointOutParameters>(json);
     p2.BBox.Should().NotBeNull();
     p2.BBox.TopLeft.Should().Be(p.BBox.TopLeft);
     p2.BBox.BottomRight.Should().Be(p.BBox.BottomRight);
 }
        public void ShouldDeserialiseObjectToStringRepresentation()
        {
            var p = new TestGeoPointOutParameters()
            {
                BBox  = "[2.123,-3.213234][2.123,-3.213234]",
                Point = "2.1,3.4"
            };
            var json = JsonConvert.SerializeObject(p);
            var p2   = JsonConvert.DeserializeObject <TestGeoPointParameters>(json);

            p2.BBox.Should().BeEquivalentTo(p.BBox);
            p2.Point.Should().BeEquivalentTo(p.Point.ToString());
        }
        public void ShouldDeserialiseGeoBoundingBoxToGeoBoundingBox()
        {
            var p = new TestGeoPointOutParameters()
            {
                BBox     = "[2.123,-3.213234][2.123,-3.213234]",
                NestBBox = new GeoBoundingBox()
                {
                    TopLeft = "2,3", BottomRight = "4,5"
                }
            };
            var json = JsonConvert.SerializeObject(p);
            var p2   = JsonConvert.DeserializeObject <TestGeoPointOutParameters>(json);

            p2.BBox.Should().NotBeNull();
            p2.BBox.TopLeft.Should().Be(p.BBox.TopLeft);
            p2.BBox.BottomRight.Should().Be(p.BBox.BottomRight);

            p2.NestBBox.BottomRight.Should().Be(p.NestBBox.BottomRight);
            p2.NestBBox.TopLeft.Should().Be(p.NestBBox.TopLeft);
        }