Sha256: faedea1cf1cd588957315816f60926ded0e11270092eea2a33daa418e54be4b6

Contents?: true

Size: 823 Bytes

Versions: 2

Compression:

Stored size: 823 Bytes

Contents

# coding: utf-8

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

2 entries across 2 versions & 1 rubygems

Version Path
thinreports-0.9.1 test/unit/core/shape/basic/test_format.rb
thinreports-0.9.0 test/unit/core/shape/basic/test_format.rb