fit 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/CHANGELOG +27 -0
  2. data/{README.txt → README.rdoc} +28 -9
  3. data/Rakefile +44 -4
  4. data/bin/fit +29 -3
  5. data/doc/book/TestChatServer.html +207 -0
  6. data/doc/book/TestDiscount.html +178 -0
  7. data/doc/book/TestDiscountGroup.html +223 -0
  8. data/doc/book/TestDiscountMoney.html +179 -0
  9. data/doc/book/TestLateHours.html +245 -0
  10. data/doc/bugs/ColumnFixtureFollowedByActionFixture.html +316 -0
  11. data/doc/examples/MusicExampleWithErrors.html +1 -1
  12. data/doc/spec/annotation.html +3634 -3833
  13. data/doc/spec/index.html +1043 -947
  14. data/doc/spec/parse-windows-1252.html +3806 -0
  15. data/doc/spec/parse.html +3806 -3094
  16. data/doc/spec/ui.html +1537 -0
  17. data/lib/eg/all_files.rb +1 -1
  18. data/lib/eg/book/calculate_discount.rb +25 -0
  19. data/lib/eg/book/calculate_discount_money.rb +60 -0
  20. data/lib/eg/book/chat_server_actions.rb +85 -0
  21. data/lib/eg/book/discount_group_ordered_list.rb +59 -0
  22. data/lib/eg/book/rent/calculate_late_hours.rb +35 -0
  23. data/lib/eg/column_index.rb +4 -3
  24. data/lib/eg/music/display.rb +4 -2
  25. data/lib/eg/music/music.rb +4 -2
  26. data/lib/fat/command_line_fixture.rb +33 -0
  27. data/lib/fat/html_to_text_fixture.rb +3 -3
  28. data/lib/fit/column_fixture.rb +11 -7
  29. data/lib/fit/file_runner.rb +65 -10
  30. data/lib/fit/fixture.rb +10 -4
  31. data/lib/fit/fixture_loader.rb +29 -19
  32. data/lib/fit/parse.rb +46 -12
  33. data/lib/fit/type_adapter.rb +8 -3
  34. data/lib/fit/version.rb +26 -0
  35. data/lib/fitlibrary/comment_fixture.rb +12 -0
  36. data/lib/fitlibrary/spec/specify_fixture.rb +154 -0
  37. data/lib/fitlibrary/specify/column_fixture_under_test.rb +17 -0
  38. data/lib/fitlibrary/specify/column_fixture_under_test_with_args.rb +17 -0
  39. data/lib/fittask.rb +43 -47
  40. data/test/all_tests.rb +2 -1
  41. data/test/column_fixture_test.rb +26 -0
  42. data/test/file_runner_test.rb +2 -7
  43. data/test/fixture_loader_test.rb +16 -3
  44. data/test/parse_test.rb +18 -3
  45. data/test/type_adapter_test.rb +58 -44
  46. metadata +180 -156
@@ -0,0 +1,27 @@
1
+ 1.2
2
+
3
+ * Support Ruby 1.9.
4
+ * Explicitly force Dir.glob order to avoid inconsistencies on Ruby 1.8.7.
5
+ * Compliance with Fit 1.2 specification (both mandatory and recommended):
6
+ * support numeric entities in HTML files;
7
+ * provide an --encoding option on the command line to set the character
8
+ encoding used for reading input and writing output files;
9
+ * provide --version and --help command line options.
10
+ * Support character encoding also from within Rake::FitTask.
11
+ * Better error messages on the command line when input/output files are not
12
+ found/given.
13
+ * Speed up the process of loading fixtures in Fit::FixtureLoader.
14
+ * Report every exception within Fitnesse. (RubyForge patch #5100)
15
+ * Multiple fixtures executed on the same HTML file now use a single loader.
16
+ (RubyForge bug #14379)
17
+ * Distribution now includes examples from the Fit book.
18
+ * Better integer parsing in Fit::GenericAdapter. (RubyForge bug #25897)
19
+ * Better float parsing in Fit::GenericAdapter. (RubyForge bug #25640)
20
+ * Load class AFixture even when class A exists.
21
+ * Avoid extra whitespace when converting HTML table header text to Ruby
22
+ method names. (RubyForge bug #22283)
23
+ * Use the canonical string representation for arrays.
24
+
25
+ 1.1
26
+
27
+ * Initial release, compliant with Fit 1.1 specification.
@@ -6,13 +6,13 @@ http://fit.rubyforge.org for further information.
6
6
 
7
7
  Author:: Giulio Piancastelli <giulio.piancastelli@gmail.com>
8
8
  Requires:: Ruby 1.8 or later
9
- License:: RubyFIT is Copyright 2004-2006 by Giulio Piancastelli.
9
+ License:: RubyFIT is Copyright 2004-2009 by Giulio Piancastelli.
10
10
  FIT is Copyright 2002 by Cunningham & Cunningham, Inc.
11
11
  Both FIT and RubyFIT are released under the terms of the GNU
12
12
  General Public License version 2 or later.
13
13
 
14
14
  Document created on Saturday 11th December, 2004.
15
- Last revised on Saturday 20th May, 2006.
15
+ Last revised on Wednesday 14th October, 2009.
16
16
 
17
17
  == Quick Start
18
18
 
@@ -25,7 +25,7 @@ the installation of RubyFIT as a gem on your system. (See RubyGems at
25
25
  http://rubygems.rubyforge.org and its documentation for details on how
26
26
  to do it.) When RubyFIT is installed, you still can run unit tests just
27
27
  by moving into its installation directory in the Ruby environment (e.g.
28
- <tt>$RUBY_HOME/lib/ruby/gems/1.8/gems/fit-1.1/</tt>) and typing +rake+
28
+ <tt>$RUBY_HOME/lib/ruby/gems/1.8/gems/fit-1.2/</tt>) and typing +rake+
29
29
  at the Terminal or Command Prompt in that directory, which contains
30
30
  RubyFIT's Rakefile. If you don't have Rake installed, you can still
31
31
  manually run tests by executing the <tt>test/all_tests.rb</tt> script.
@@ -40,7 +40,7 @@ Typing <tt>rake fit_report</tt> instead will also have the effect of
40
40
  generating reports for those tests, so that you can see green, red,
41
41
  yellow and gray cells with your own eyes.
42
42
 
43
- The specification for FIT 1.1 compliant implementations is also
43
+ The specification for FIT 1.2 compliant implementations is also
44
44
  included, in the <tt>doc/spec</tt> directory. Running
45
45
  <tt>rake fitspec</tt> or <tt>rake fitspec_report</tt> will have the
46
46
  same effects described above in the context of RubyFIT's examples.
@@ -64,9 +64,26 @@ Terminal or Console prompt are made available at any file system
64
64
  location.
65
65
 
66
66
  You can invoke the +fit+ script passing two arguments: the first is the
67
- HTML file containing tables to be tested, the second is the name of the
68
- HTML file which will be created by RubyFIT and will contain the results
69
- of the tests.
67
+ name of the input HTML file containing tables to be tested, the second
68
+ is the name of the output HTML file which will be created by RubyFIT and
69
+ will contain the results of the tests.
70
+
71
+ As of version 1.2, the command-line script supports an <tt>--encoding</tt>
72
+ option, used to indicate the encoding of the input and output files.
73
+ Internally, RubyFIT uses UTF-8 as the default encoding to substitute
74
+ characters such as non-breaking spaces and typographic quotes. This means
75
+ that, if your HTML files are already encoded in UTF-8, you don't need to
76
+ pass the <tt>--encoding</tt> option on the command line; otherwise, you
77
+ may need to supply the proper character encoding in order to have the
78
+ script correctly recognize and produce HTML code.
79
+
80
+ As an example, the <tt>doc/spec</tt> directory contains two files for the
81
+ parsing Fit specification, each with a different encoding. The first file is
82
+ named <tt>parse.html</tt> and is encoded in UTF-8; this is the file that is
83
+ run by the <tt>rake fitspec</tt> command. The second file is named
84
+ <tt>parse-windows-1252.html</tt> and is encoded in windows-1252. When fed
85
+ to the +fit+ script on the command line, the tests in this file pass only
86
+ if the proper <tt>--encoding=windows-1252</tt> option is supplied.
70
87
 
71
88
  === RubyFIT from a web server
72
89
 
@@ -106,7 +123,7 @@ within Fitnesse. After installing RubyFIT as a gem in your Ruby
106
123
  environment, you can reference the <tt>FitServer.rb</tt> script in
107
124
  Fitnesse from the location of the installed gem. For instance you can
108
125
  set the latest parameter defining the command pattern to the string
109
- <tt>/usr/lib/ruby/gems/1.8/gems/fit-1.1/bin/FitServer.rb</tt> for some
126
+ <tt>/usr/lib/ruby/gems/1.8/gems/fit-1.2/bin/FitServer.rb</tt> for some
110
127
  Linux flavors.
111
128
 
112
129
  == RubyFIT Development Issues
@@ -128,7 +145,7 @@ difference is retained. A workaround in Fit::ScientificDouble has been
128
145
  implemented, so that if the precision is exactly zero, the values of
129
146
  two comparing objects must be equals in a 1.0e-5 delta.
130
147
 
131
- Note than in <tt>AllCombinations.html</tt> Ruby does even
148
+ Note that in <tt>AllCombinations.html</tt> Ruby does even
132
149
  ScientificDouble with much more precision than the Java version. So,
133
150
  another workaround in <tt>==</tt> and <tt><=></tt> had to be employed,
134
151
  specifically to create another ScientificDouble to compare with and to
@@ -196,6 +213,8 @@ Other developers have contributed code to the project:
196
213
  - Jim Hughes
197
214
  - Brian Marick
198
215
  - Bret Pettichord
216
+ - Jari Bakken
217
+ - Zhon Johansen
199
218
 
200
219
  === Special Thanks
201
220
 
data/Rakefile CHANGED
@@ -53,14 +53,46 @@ Rake::FitTask.new(:fit) do |t|
53
53
 
54
54
  end
55
55
 
56
+ # desc 'Run tests from the book "Fit for developing software" by R.Mugridge & W.Cunningham'
57
+ Rake::FitTask.new(:fitbook) do |t|
58
+ # Examples from the book "Fit for developing software" by R.Mugridge & W.Cunningham
59
+ t.create_test_suite do |suite|
60
+ tests = []
61
+ tests << { :name => 'TestDiscount',
62
+ :right => 7, :wrong => 1, :ignores => 0, :exceptions => 0 }
63
+ tests << { :name => 'TestDiscountMoney',
64
+ :right => 7, :wrong => 1, :ignores => 0, :exceptions => 0 }
65
+ tests << { :name => 'TestChatServer' }
66
+ tests << { :name => 'TestDiscountGroup' }
67
+ tests << { :name => 'TestLateHours' }
68
+ suite.test_path = "doc/book/"
69
+ suite.report_path = "doc/book/"
70
+ suite.tests = tests
71
+
72
+ CLOBBER.include(suite.report_path + "Report_*.html")
73
+ CLOBBER.include(suite.report_path + "footnotes/")
74
+ end
75
+ end
76
+
77
+ Rake::FitTask.new(:fitbugs) do |t|
78
+ t.create_test_suite do |suite|
79
+ suite.test_path = "doc/bugs/"
80
+ suite.report_path = "doc/bugs/"
81
+ suite << { :name => 'ColumnFixtureFollowedByActionFixture',
82
+ :right => 8, :wrong => 1, :ignores => 0, :exceptions => 0 }
83
+ end
84
+ end
85
+
56
86
  Rake::FitTask.new(:fitspec) do |t|
57
87
  t.create_test_suite do |suite|
58
88
  suite.test_path = "doc/spec/"
59
89
  suite.report_path = "doc/spec/"
60
90
  suite << { :name => 'parse',
61
- :right => 70, :wrong => 0, :ignores => 0, :exceptions => 0 }
91
+ :right => 83, :wrong => 0, :ignores => 0, :exceptions => 0 }
62
92
  suite << { :name => 'annotation',
63
93
  :right => 47, :wrong => 0, :ignores => 0, :exceptions => 0 }
94
+ suite << { :name => 'ui',
95
+ :right => 30, :wrong => 0, :ignores => 0, :exceptions => 0 }
64
96
  end
65
97
  end
66
98
 
@@ -80,9 +112,11 @@ end
80
112
 
81
113
  require 'rake/gempackagetask'
82
114
 
115
+ require 'fit/version'
116
+
83
117
  spec = Gem::Specification.new do |s|
84
118
  s.name = 'fit'
85
- s.version = '1.1'
119
+ s.version = Fit::VERSION
86
120
  s.author = 'Giulio Piancastelli'
87
121
  # See the README for other authors/developers/contributors
88
122
  s.email = 'giulio.piancastelli@gmail.com'
@@ -90,7 +124,13 @@ spec = Gem::Specification.new do |s|
90
124
  s.rubyforge_project = 'fit'
91
125
  s.platform = Gem::Platform::RUBY
92
126
  s.summary = 'A Ruby port of FIT (Framework for Integrated Testing)'
93
- s.files = FileList["{bin,lib,test,doc}/**/*"].to_a + ["Rakefile"]
127
+ s.description = <<EOF_DESCRIPTION
128
+ RubyFIT is a tool for enhancing communication and collaboration in
129
+ software development. It allows customers, testers, and programmers
130
+ to learn what their software should do and what it does do, by
131
+ automatically comparing customers' expectations to actual results.
132
+ EOF_DESCRIPTION
133
+ s.files = FileList["{bin,lib,test,doc}/**/*"].to_a + ["Rakefile", "CHANGELOG"]
94
134
  s.require_path = 'lib'
95
135
  # s.autorequire something?
96
136
  # set for executable scripts in the bin/ subdirectory
@@ -98,7 +138,7 @@ spec = Gem::Specification.new do |s|
98
138
  s.executables << 'fit'
99
139
  s.test_file = 'test/all_tests.rb'
100
140
  s.has_rdoc = false # no RDoc comments in the code
101
- s.extra_rdoc_files = ["README.txt"]
141
+ s.extra_rdoc_files = ["README.rdoc"]
102
142
  # no external dependencies on other gems
103
143
  end
104
144
 
data/bin/fit CHANGED
@@ -1,10 +1,36 @@
1
+ #!/usr/bin/env ruby
1
2
  $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
3
 
3
- require 'fit/parse'
4
4
  require 'fit/file_runner'
5
+ require 'fit/parse'
6
+ require 'fit/version'
7
+
8
+ require 'optparse'
9
+
10
+ options = {}
11
+
12
+ option_parser = OptionParser.new
13
+ option_parser.on("-v", "--version") do
14
+ puts Fit::VERSION_BLURB
15
+ exit 0
16
+ end
17
+ option_parser.on("-h", "--help") do
18
+ puts Fit::HELP_BLURB
19
+ exit 0
20
+ end
21
+ option_parser.on("-eENC", "--encoding=ENC", String) do |enc|
22
+ options[:encoding] = enc
23
+ end
24
+
25
+ begin
26
+ args = option_parser.parse(ARGV)
27
+ rescue OptionParser::InvalidOption => invalid
28
+ puts "#{File.basename($0)}: #{invalid.message}"
29
+ exit -1
30
+ end
5
31
 
6
- report = ARGV[1]
32
+ report = args[1]
7
33
  unless report.nil?
8
34
  Fit::Parse.footnote_path = File.dirname(report) + File::SEPARATOR
9
35
  end
10
- Fit::FileRunner.new.run ARGV
36
+ Fit::FileRunner.new.run(args, options.empty? ? nil : options)
@@ -0,0 +1,207 @@
1
+ <html xmlns:o="urn:schemas-microsoft-com:office:office"
2
+ xmlns:w="urn:schemas-microsoft-com:office:word"
3
+ xmlns="http://www.w3.org/TR/REC-html40">
4
+
5
+ <head>
6
+ <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
7
+ <meta name=ProgId content=Word.Document>
8
+ <meta name=Generator content="Microsoft Word 11">
9
+ <meta name=Originator content="Microsoft Word 11">
10
+ <link rel=File-List href="TestChatServer_file/filelist.xml">
11
+ <title>ChatServerActions</title>
12
+ <!--[if gte mso 9]><xml>
13
+ <w:WordDocument>
14
+ <w:GrammarState>Clean</w:GrammarState>
15
+ <w:HyphenationZone>14</w:HyphenationZone>
16
+ <w:ValidateAgainstSchemas/>
17
+ <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
18
+ <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
19
+ <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
20
+ <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
21
+ </w:WordDocument>
22
+ </xml><![endif]--><!--[if gte mso 9]><xml>
23
+ <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
24
+ </w:LatentStyles>
25
+ </xml><![endif]-->
26
+ <style>
27
+ <!--
28
+ /* Style Definitions */
29
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
30
+ {mso-style-parent:"";
31
+ margin:0cm;
32
+ margin-bottom:.0001pt;
33
+ mso-pagination:widow-orphan;
34
+ font-size:12.0pt;
35
+ font-family:"Times New Roman";
36
+ mso-fareast-font-family:"Times New Roman";}
37
+ span.GramE
38
+ {mso-style-name:"";
39
+ mso-gram-e:yes;}
40
+ @page Section1
41
+ {size:595.3pt 841.9pt;
42
+ margin:70.85pt 2.0cm 2.0cm 2.0cm;
43
+ mso-header-margin:35.4pt;
44
+ mso-footer-margin:35.4pt;
45
+ mso-paper-source:0;}
46
+ div.Section1
47
+ {page:Section1;}
48
+ -->
49
+ </style>
50
+ <!--[if gte mso 10]>
51
+ <style>
52
+ /* Style Definitions */
53
+ table.MsoNormalTable
54
+ {mso-style-name:"Tabella normale";
55
+ mso-tstyle-rowband-size:0;
56
+ mso-tstyle-colband-size:0;
57
+ mso-style-noshow:yes;
58
+ mso-style-parent:"";
59
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
60
+ mso-para-margin:0cm;
61
+ mso-para-margin-bottom:.0001pt;
62
+ mso-pagination:widow-orphan;
63
+ font-size:10.0pt;
64
+ font-family:"Times New Roman";
65
+ mso-ansi-language:#0400;
66
+ mso-fareast-language:#0400;
67
+ mso-bidi-language:#0400;}
68
+ </style>
69
+ <![endif]-->
70
+ </head>
71
+
72
+ <body lang=IT style='tab-interval:35.4pt'>
73
+
74
+ <div class=Section1>
75
+
76
+ <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
77
+ style='border-collapse:collapse;mso-padding-alt:0cm 0cm 0cm 0cm'>
78
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
79
+ <td colspan=3 valign=top style='border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
80
+ <p class=MsoNormal>fit.ActionFixture</p>
81
+ </td>
82
+ </tr>
83
+ <tr style='mso-yfti-irow:1'>
84
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
85
+ padding:0cm 5.4pt 0cm 5.4pt'>
86
+ <p class=MsoNormal>start</p>
87
+ </td>
88
+ <td colspan=2 valign=top style='border-top:none;border-left:none;border-bottom:
89
+ solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
90
+ <p class=MsoNormal>Eg::Book::ChatServerActions</p>
91
+ </td>
92
+ </tr>
93
+ <tr style='mso-yfti-irow:2'>
94
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
95
+ padding:0cm 5.4pt 0cm 5.4pt'>
96
+ <p class=MsoNormal>enter</p>
97
+ </td>
98
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
99
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
100
+ <p class=MsoNormal>user</p>
101
+ </td>
102
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
103
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
104
+ <p class=MsoNormal>anna</p>
105
+ </td>
106
+ </tr>
107
+ <tr style='mso-yfti-irow:3'>
108
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
109
+ padding:0cm 5.4pt 0cm 5.4pt'>
110
+ <p class=MsoNormal>press</p>
111
+ </td>
112
+ <td colspan=2 valign=top style='border-top:none;border-left:none;border-bottom:
113
+ solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
114
+ <p class=MsoNormal>connect</p>
115
+ </td>
116
+ </tr>
117
+ <tr style='mso-yfti-irow:4'>
118
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
119
+ padding:0cm 5.4pt 0cm 5.4pt'>
120
+ <p class=MsoNormal>enter</p>
121
+ </td>
122
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
123
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
124
+ <p class=MsoNormal>room</p>
125
+ </td>
126
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
127
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
128
+ <p class=MsoNormal>lotr</p>
129
+ </td>
130
+ </tr>
131
+ <tr style='mso-yfti-irow:5'>
132
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
133
+ padding:0cm 5.4pt 0cm 5.4pt'>
134
+ <p class=MsoNormal>press</p>
135
+ </td>
136
+ <td colspan=2 valign=top style='border-top:none;border-left:none;border-bottom:
137
+ solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
138
+ <p class=MsoNormal><span class=GramE>new</span> room</p>
139
+ </td>
140
+ </tr>
141
+ <tr style='mso-yfti-irow:6'>
142
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
143
+ padding:0cm 5.4pt 0cm 5.4pt'>
144
+ <p class=MsoNormal>press</p>
145
+ </td>
146
+ <td colspan=2 valign=top style='border-top:none;border-left:none;border-bottom:
147
+ solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
148
+ <p class=MsoNormal><span class=GramE>enter</span> room</p>
149
+ </td>
150
+ </tr>
151
+ <tr style='mso-yfti-irow:7'>
152
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
153
+ padding:0cm 5.4pt 0cm 5.4pt'>
154
+ <p class=MsoNormal>enter</p>
155
+ </td>
156
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
157
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
158
+ <p class=MsoNormal>user</p>
159
+ </td>
160
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
161
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
162
+ <p class=MsoNormal>luke</p>
163
+ </td>
164
+ </tr>
165
+ <tr style='mso-yfti-irow:8'>
166
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
167
+ padding:0cm 5.4pt 0cm 5.4pt'>
168
+ <p class=MsoNormal>press</p>
169
+ </td>
170
+ <td colspan=2 valign=top style='border-top:none;border-left:none;border-bottom:
171
+ solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
172
+ <p class=MsoNormal>connect</p>
173
+ </td>
174
+ </tr>
175
+ <tr style='mso-yfti-irow:9'>
176
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
177
+ padding:0cm 5.4pt 0cm 5.4pt'>
178
+ <p class=MsoNormal>press</p>
179
+ </td>
180
+ <td colspan=2 valign=top style='border-top:none;border-left:none;border-bottom:
181
+ solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
182
+ <p class=MsoNormal><span class=GramE>enter</span> room</p>
183
+ </td>
184
+ </tr>
185
+ <tr style='mso-yfti-irow:10;mso-yfti-lastrow:yes'>
186
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
187
+ padding:0cm 5.4pt 0cm 5.4pt'>
188
+ <p class=MsoNormal>check</p>
189
+ </td>
190
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
191
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
192
+ <p class=MsoNormal><span class=GramE>occupant</span> count</p>
193
+ </td>
194
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
195
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
196
+ <p class=MsoNormal>2</p>
197
+ </td>
198
+ </tr>
199
+ </table>
200
+
201
+ <p class=MsoNormal>&nbsp;</p>
202
+
203
+ </div>
204
+
205
+ </body>
206
+
207
+ </html>
@@ -0,0 +1,178 @@
1
+ <html xmlns:o="urn:schemas-microsoft-com:office:office"
2
+ xmlns:w="urn:schemas-microsoft-com:office:word"
3
+ xmlns="http://www.w3.org/TR/REC-html40">
4
+
5
+ <head>
6
+ <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
7
+ <meta name=ProgId content=Word.Document>
8
+ <meta name=Generator content="Microsoft Word 11">
9
+ <meta name=Originator content="Microsoft Word 11">
10
+ <link rel=File-List href="TestDiscount_file/filelist.xml">
11
+ <title>CalculateDiscount</title>
12
+ <!--[if gte mso 9]><xml>
13
+ <w:WordDocument>
14
+ <w:GrammarState>Clean</w:GrammarState>
15
+ <w:HyphenationZone>14</w:HyphenationZone>
16
+ <w:ValidateAgainstSchemas/>
17
+ <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
18
+ <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
19
+ <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
20
+ <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
21
+ </w:WordDocument>
22
+ </xml><![endif]--><!--[if gte mso 9]><xml>
23
+ <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
24
+ </w:LatentStyles>
25
+ </xml><![endif]-->
26
+ <style>
27
+ <!--
28
+ /* Style Definitions */
29
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
30
+ {mso-style-parent:"";
31
+ margin:0cm;
32
+ margin-bottom:.0001pt;
33
+ mso-pagination:widow-orphan;
34
+ font-size:12.0pt;
35
+ font-family:"Times New Roman";
36
+ mso-fareast-font-family:"Times New Roman";}
37
+ @page Section1
38
+ {size:595.3pt 841.9pt;
39
+ margin:70.85pt 2.0cm 2.0cm 2.0cm;
40
+ mso-header-margin:35.4pt;
41
+ mso-footer-margin:35.4pt;
42
+ mso-paper-source:0;}
43
+ div.Section1
44
+ {page:Section1;}
45
+ -->
46
+ </style>
47
+ <!--[if gte mso 10]>
48
+ <style>
49
+ /* Style Definitions */
50
+ table.MsoNormalTable
51
+ {mso-style-name:"Tabella normale";
52
+ mso-tstyle-rowband-size:0;
53
+ mso-tstyle-colband-size:0;
54
+ mso-style-noshow:yes;
55
+ mso-style-parent:"";
56
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
57
+ mso-para-margin:0cm;
58
+ mso-para-margin-bottom:.0001pt;
59
+ mso-pagination:widow-orphan;
60
+ font-size:10.0pt;
61
+ font-family:"Times New Roman";
62
+ mso-ansi-language:#0400;
63
+ mso-fareast-language:#0400;
64
+ mso-bidi-language:#0400;}
65
+ </style>
66
+ <![endif]-->
67
+ </head>
68
+
69
+ <body lang=IT style='tab-interval:35.4pt'>
70
+
71
+ <div class=Section1>
72
+
73
+ <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
74
+ style='border-collapse:collapse;mso-padding-alt:0cm 0cm 0cm 0cm'>
75
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
76
+ <td colspan=2 valign=top style='border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
77
+ <p class=MsoNormal>Eg::Book::CalculateDiscount</p>
78
+ </td>
79
+ </tr>
80
+ <tr style='mso-yfti-irow:1'>
81
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
82
+ padding:0cm 5.4pt 0cm 5.4pt'>
83
+ <p class=MsoNormal>amount</p>
84
+ </td>
85
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
86
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
87
+ <p class=MsoNormal>discount()</p>
88
+ </td>
89
+ </tr>
90
+ <tr style='mso-yfti-irow:2'>
91
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
92
+ padding:0cm 5.4pt 0cm 5.4pt'>
93
+ <p class=MsoNormal>0.00</p>
94
+ </td>
95
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
96
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
97
+ <p class=MsoNormal>0.00</p>
98
+ </td>
99
+ </tr>
100
+ <tr style='mso-yfti-irow:3'>
101
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
102
+ padding:0cm 5.4pt 0cm 5.4pt'>
103
+ <p class=MsoNormal>100.00</p>
104
+ </td>
105
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
106
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
107
+ <p class=MsoNormal>0.00</p>
108
+ </td>
109
+ </tr>
110
+ <tr style='mso-yfti-irow:4'>
111
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
112
+ padding:0cm 5.4pt 0cm 5.4pt'>
113
+ <p class=MsoNormal>999.00</p>
114
+ </td>
115
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
116
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
117
+ <p class=MsoNormal>0.00</p>
118
+ </td>
119
+ </tr>
120
+ <tr style='mso-yfti-irow:5'>
121
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
122
+ padding:0cm 5.4pt 0cm 5.4pt'>
123
+ <p class=MsoNormal>1000.00</p>
124
+ </td>
125
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
126
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
127
+ <p class=MsoNormal>0.00</p>
128
+ </td>
129
+ </tr>
130
+ <tr style='mso-yfti-irow:6'>
131
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
132
+ padding:0cm 5.4pt 0cm 5.4pt'>
133
+ <p class=MsoNormal>1010.00</p>
134
+ </td>
135
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
136
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
137
+ <p class=MsoNormal>50.50</p>
138
+ </td>
139
+ </tr>
140
+ <tr style='mso-yfti-irow:7'>
141
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
142
+ padding:0cm 5.4pt 0cm 5.4pt'>
143
+ <p class=MsoNormal>1100.00</p>
144
+ </td>
145
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
146
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
147
+ <p class=MsoNormal>55.00</p>
148
+ </td>
149
+ </tr>
150
+ <tr style='mso-yfti-irow:8'>
151
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
152
+ padding:0cm 5.4pt 0cm 5.4pt'>
153
+ <p class=MsoNormal>1200.00</p>
154
+ </td>
155
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
156
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
157
+ <p class=MsoNormal>60.00</p>
158
+ </td>
159
+ </tr>
160
+ <tr style='mso-yfti-irow:9;mso-yfti-lastrow:yes'>
161
+ <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
162
+ padding:0cm 5.4pt 0cm 5.4pt'>
163
+ <p class=MsoNormal>2000.00</p>
164
+ </td>
165
+ <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
166
+ border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
167
+ <p class=MsoNormal>100.00</p>
168
+ </td>
169
+ </tr>
170
+ </table>
171
+
172
+ <p class=MsoNormal>&nbsp;</p>
173
+
174
+ </div>
175
+
176
+ </body>
177
+
178
+ </html>