Sha256: d248448b43df4a1edd3436c066319e477f67eb8bbe06b12da04c8cface064585

Contents?: true

Size: 1.24 KB

Versions: 9

Compression:

Stored size: 1.24 KB

Contents

require 'spec_helper'

NUM_POINTS = 3

describe 'MultiPointShapeBuffer' do
  before(:each) do
    @shape = FileGDB::MultiPointShapeBuffer.new
  end

  it 'sets up the geometry' do
    lambda { @shape.setup(8, NUM_POINTS) }.should_not raise_error
  end

  it 'gets the number of points' do
    @shape.setup(8, NUM_POINTS)
    @shape.get_num_points.should eq(NUM_POINTS)
  end

  it 'gets the points' do
    @shape.setup(8, NUM_POINTS)
    @shape.get_points.should have(3).items
  end

  it 'gets the z values' do
    @shape.setup(18, NUM_POINTS)
    @shape.z.should have(3).items
  end

  it 'gets the m values' do
    @shape.setup(18, NUM_POINTS)
    @shape.m.should have(3).items
  end

  it 'gets the id values' do
    @shape.setup(18, NUM_POINTS)
    lambda { @shape.id }.should raise_error
  end

  it 'gets the extent' do
    @shape.setup(18, NUM_POINTS)
    @shape.get_extent.should eq([0, 0, 0, 0])
  end

  it 'gets the z extent' do
    @shape.setup(18, NUM_POINTS)
    @shape.get_z_extent.should eq([0, 0])
  end

  it 'gets the m extent' do
    @shape.setup(18, NUM_POINTS)
    @shape.get_m_extent.should eq([0, 0])
  end

  it 'calculates the extent' do
    @shape.setup(18, NUM_POINTS)
    lambda { @shape.calculate_extent }.should_not raise_error
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
filegdb-1.1.1 spec/multi_point_shape_buffer_spec.rb
filegdb-1.1.0 spec/multi_point_shape_buffer_spec.rb
filegdb-1.0.0 spec/multi_point_shape_buffer_spec.rb
filegdb-0.0.6 spec/multi_point_shape_buffer_spec.rb
filegdb-0.0.5 spec/multi_point_shape_buffer_spec.rb
filegdb-0.0.4 spec/multi_point_shape_buffer_spec.rb
filegdb-0.0.3 spec/multi_point_shape_buffer_spec.rb
filegdb-0.0.2 spec/multi_point_shape_buffer_spec.rb
filegdb-0.0.1 spec/multi_point_shape_buffer_spec.rb