Class: ODDB::TestFachinfoRule

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
ext/fipdf/test/rules_test.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



19
20
21
# File 'ext/fipdf/test/rules_test.rb', line 19

def setup
	@fachinfo_rule = ODDB::FiPDF::FachinfoRule.new(:Fachinfo_rule)
end

#test_fachinfo_fulfilledObject



22
23
24
25
26
27
28
# File 'ext/fipdf/test/rules_test.rb', line 22

def test_fachinfo_fulfilled
	@fachinfo_rule.notify(:write_paragraph)
	@fachinfo_rule.notify(:ez_new_page)
	assert_equal(true, @fachinfo_rule.fulfilled?)
	@fachinfo_rule.notify(:write_paragraph)
	assert_equal(true, @fachinfo_rule.fulfilled?)
end

#test_fachinfo_fulfilled_no_page_breakObject



29
30
31
32
33
34
# File 'ext/fipdf/test/rules_test.rb', line 29

def test_fachinfo_fulfilled_no_page_break
	@fachinfo_rule.notify(:write_paragraph)
	assert_equal(true, @fachinfo_rule.fulfilled?)
	@fachinfo_rule.notify(:write_paragraph)
	assert_equal(true, @fachinfo_rule.fulfilled?)
end

#test_fachinfo_not_fulfilledObject



35
36
37
38
39
40
# File 'ext/fipdf/test/rules_test.rb', line 35

def test_fachinfo_not_fulfilled
	@fachinfo_rule.notify(:ez_new_page)
	assert_equal(false, @fachinfo_rule.fulfilled?)
	@fachinfo_rule.notify(:write_paragraph)
	assert_equal(false, @fachinfo_rule.fulfilled?)
end