Sha256: d507db066768e2e4c34fc8e1c9471d9665603088eb6c2beae789408d5321b4c7

Contents?: true

Size: 919 Bytes

Versions: 6

Compression:

Stored size: 919 Bytes

Contents

require 'spec_helper'
require_relative 'shared_examples'

describe OData4::Properties::Geography::Point do
  let(:klass) { OData4::Properties::Geography::Point }
  let(:property_name) { 'Location' }
  let(:srid)  { 4326 }
  let(:coordinates)    { [ 142.1, 64.1 ]}
  let(:property_as_text) { "geography'SRID=4326;Point(142.1 64.1)'" }
  let(:property_as_json) { {
    type: 'Point',
    coordinates: [142.1, 64.1],
    crs: {
      type: 'name',
      properties: { name: 'EPSG:4326' }
    }
  } }
  let(:property_as_xml) { <<-END }
    <data:Location metadata:type="Edm.GeographyPoint">
      <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
        <gml:pos>142.1 64.1</gml:pos>
      </gml:Point>
    </data:Location>
  END
  let(:new_value) { [ 100.0, 0.0 ] }
  let(:new_value_as_text) { "geography'SRID=0;Point(100.0 0.0)'" }

  it_behaves_like 'a geographic property', 'Edm.GeographyPoint'
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
odata4-0.9.1 spec/odata4/properties/geography/point_spec.rb
odata4-0.9.0 spec/odata4/properties/geography/point_spec.rb
odata4-0.8.2 spec/odata4/properties/geography/point_spec.rb
odata4-0.8.1 spec/odata4/properties/geography/point_spec.rb
odata4-0.8.0 spec/odata4/properties/geography/point_spec.rb
odata4-0.7.0 spec/odata4/properties/geography/point_spec.rb