Sha256: fb81c94c1a42ab98c29db0a7b3a1753e558dbc6208a7c487f1d3550f0a8c3f37

Contents?: true

Size: 837 Bytes

Versions: 4

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class Thinreports::Core::Shape::Basic::TestFormat < Minitest::Test
  include Thinreports::TestHelper

  RECT_FORMAT = {
    "id" => "",
    "type" => "rect",
    "x" => 100.0,
    "y" => 200.0,
    "width" => 300.0,
    "height" => 400.0,
    "description" => "Description for rect",
    "display" => true,
    "rx" => 1.0,
    "ry" => 1.0,
    "style" => {
      "border-width" => 1,
      "border-color" => "#000000",
      "border-style" => "dashed",
      "fill-color" => "#ff0000"
    }
  }

  Basic = Thinreports::Core::Shape::Basic

  def test_attribute_readers
    format = Basic::Format.new(RECT_FORMAT)

    assert_equal '', format.id
    assert_equal 'rect', format.type
    assert_equal RECT_FORMAT['style'], format.style
    assert_equal true, format.display?
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinreports-0.10.3 test/units/core/shape/basic/test_format.rb
thinreports-0.10.2 test/unit/core/shape/basic/test_format.rb
thinreports-0.10.1 test/unit/core/shape/basic/test_format.rb
thinreports-0.10.0 test/unit/core/shape/basic/test_format.rb