513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
|
# File 'ext/fiparse/test/test_patinfo_hpricot.rb', line 513
def test_composition4
chapter = @writer.composition
assert_instance_of(ODDB::Text::Chapter, chapter )
assert_equal('Was ist in Ponstan enthalten?', chapter.heading)
assert_equal(5, chapter.sections.size)
section = chapter.sections.at(0)
assert_equal("", section.subheading)
assert_equal(1, section.paragraphs.size)
paragraph = section.paragraphs.at(0)
expected = "Wirkstoff: Mefenaminsäure."
assert_equal(expected, paragraph.text)
section = chapter.sections.at(1)
assert_equal("Filmtabletten\n", section.subheading)
assert_equal(1, section.paragraphs.size)
paragraph = section.paragraphs.at(0)
expected = "500 mg Mefenaminsäure sowie Vanillin (Aromaticum) und andere "
expected << "Hilfsstoffe."
assert_equal(expected, paragraph.text)
section = chapter.sections.last
assert_equal("Suspension\n", section.subheading)
assert_equal(2, section.paragraphs.size)
paragraph = section.paragraphs.at(0)
expected = "5 ml enthalten 50 mg Mefenaminsäure, Konservierungsmittel: "
expected << "Natriumbenzoat (E 211), Saccharin, Vanillin, Aromatica und "
expected << "andere Hilfsstoffe."
assert_equal(expected, paragraph.text)
paragraph = section.paragraphs.at(1)
expected = "5 ml enthalten 1 g Zucker (0,1 Brotwert)."
assert_equal(expected, paragraph.text)
end
|