Sha256: fd2127424d0b90d27a913a761d10778466211e796dcd4917504f7ae7aa7d24cd
Contents?: true
Size: 935 Bytes
Versions: 2
Compression:
Stored size: 935 Bytes
Contents
# coding: utf-8 require 'test_helper' class Thinreports::Core::Shape::List::TestSectionFormat < Minitest::Test include Thinreports::TestHelper LIST_SECTION_FORMAT = { 'enabled' => true, 'height' => 47.7, 'translate' => { 'x' => 0, 'y' => -64.2 }, 'items' => [ { 'type' => 'rect', 'id' => '' }, { 'type' => 'text-block', 'id' => 'text_block' } ] } Shape = Thinreports::Core::Shape List = Thinreports::Core::Shape::List def test_attribute_readers format = List::SectionFormat.new(LIST_SECTION_FORMAT) assert_equal 47.7, format.height assert_equal 0, format.relative_left assert_equal(-64.2, format.relative_top) assert_equal true, format.display? end def test_initialize_items format = List::SectionFormat.new(LIST_SECTION_FORMAT) assert_equal 1, format.shapes.count assert_instance_of Shape::TextBlock::Format, format.shapes[:text_block] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
thinreports-0.9.1 | test/unit/core/shape/list/test_section_format.rb |
thinreports-0.9.0 | test/unit/core/shape/list/test_section_format.rb |