Permalink
Browse files

Added second part to problem one.

Code is not updated to meet the new feature requirement
  • Loading branch information...
Gianfranco Alongi
Gianfranco Alongi committed Feb 26, 2012
1 parent 6fede51 commit 34699298ce492f107c384af9a22c08a42573098a
View
@@ -0,0 +1,82 @@
+
+Background:
+ Having shown the PoC for the Sales department during a lunch break,
+ the Sales people seemed happy.
+ This seemed to be what they wanted, of course there where some murmurs
+ of "why don't we use Excel instead", besides this, one additional specific feature
+ was required.
+ The head of Sales also agreed on defining a user acceptance test to seal the definition
+ of done..
+
+Technical:
+
+ The additional feature was the output of the result
+
+ - The result of an analysis must be output to a file named according
+ to the following scheme
+
+ analysis_result_${DIRECTORY_ANALYZED}.txt
+
+
+ This means, that if the sales people run the program on a
+ directory called ros_winter_2011/
+ the result is output to a file called
+
+ analysis_result_ros__winter_2011.txt
+
+ Where the content of the file is grouped by two headers
+
+ 'PASSED_FILES:'
+
+ and
+
+ 'FAILED_FILES:'
+
+ each line under the heading 'PASSED_FILES:' is the name of the file
+ where the projected sum and total sum matches.
+
+ each lin under the heading 'FAILED_FILES:' is the name of the file
+ where the projected sum and total sum did not match.
+ On the failed files, add the cause to why it did not match.
+
+ Example: A directory named RosFiles/ contains the following .ros files
+ 2012-01-a.ros <--- OK
+ 2012-02-a.ros <--- OK
+ 2012-03-a.ros <--- Not okay
+ 2012-01-b.ros <--- OK
+ 2012-02-b.ros <--- Not okay
+ 2012-03-b.ros <----Not okay
+
+ Thus running the program with this directory as input, the result
+ should be a file called
+
+
+ analysis_result_RosFiles.txt
+
+ containing
+
+ PASSED_FILES:
+ 2012-01-a.ros
+ 2012-02-a.ros
+ 2012-01-b.ros
+
+ FAILED_FILES:
+ 2012-03-a.ros,cause for failure
+ 2012-02-b.ros,cause for failure
+ 2012-03-b.ros,cause for failure
+
+ You where given a bunch of files for this, put into a directory
+ user_acceptance_test/ together with a file which holds the exact
+ expected result, but named user_acceptance_test.txt
+
+Task:
+ Add the extra feature, so that you pass the user acceptance test
+ by reading the files from the directory and your output file
+ analysis_result_user_acceptance_test.txt contains the same
+ as the file user_acceptance_test.txt
+
+
+
+
+
+
@@ -0,0 +1,4 @@
+paper,1,2
+water,1,2
+towel,10,2
+5
@@ -0,0 +1,4 @@
+paper,1,2
+water,1,2
+towel,10,2
+6
@@ -0,0 +1,3 @@
+paper,1,1
+water,1,2
+4
@@ -0,0 +1,3 @@
+paper,1,1
+water,1,2
+3
@@ -0,0 +1,4 @@
+paper,1,2
+water,0,0
+towel,0,0
+3
@@ -0,0 +1,4 @@
+paper,1,2
+water,0,0
+towel,0,0
+2
@@ -0,0 +1,9 @@
+PASSED_FILES:
+january-good.ros
+february-good.ros
+march-good.ros
+
+FAILED_FILES:
+january-bad.ros,total_greater_than_projected,1
+february-bad.ros,total_less_than_projected,1
+march-bad.ros,total_greater_than_projected,1

0 comments on commit 3469929

Please sign in to comment.