Sha256: 479154856f673d4439974237d9bf86e3c16757bfc5eb955f8313dfc3fb9a43a3
Contents?: true
Size: 1.32 KB
Versions: 3
Compression:
Stored size: 1.32 KB
Contents
# coding: utf-8 require 'test_helper' class Thinreports::Core::Shape::Basic::TestFormat < Minitest::Test include Thinreports::TestHelper TEST_BASIC_FORMAT = { "type" => "s-rect", "id" => "rect_1", "display" => "true", "svg" => { "tag" => "rect", "attrs" => { "stroke" => "#000000", "stroke-width" => "1", "fill" => "#ff0000", "fill-opacity" => "1", "stroke-dasharray" => "none", "rx" => "0", "ry" => "0", "width" => "196.1", "height" => "135.1", "x" => "85", "y" => "82" } } } # Alias Format = Thinreports::Core::Shape::Basic::Format def test_build_basic_format build_basic_format rescue => e flunk exception_details(e, 'Building failed.') end def test_basic_config_readers format = Format.new(TEST_BASIC_FORMAT) assert_equal format.id, 'rect_1' assert_equal format.type, 's-rect' assert_equal format.svg_tag, 'rect' assert_equal format.display?, true assert_equal format.svg_attrs['stroke'], '#000000' assert_equal format.svg_attrs['stroke-dasharray'], 'none' end def test_display? format = Format.new('display' => 'false') assert_equal format.display?, false end def build_basic_format Format.build(TEST_BASIC_FORMAT) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
thinreports-0.8.2 | test/unit/core/shape/basic/test_format.rb |
thinreports-0.8.1 | test/unit/core/shape/basic/test_format.rb |
thinreports-0.8.0 | test/unit/core/shape/basic/test_format.rb |