Ejemplo n.º 1
0
 public void testSurveyOutput_1_101_98() {
   CheckInputOutput.setInputCaptureOutput("1\n101\n98\n");
   String expected =
       "Welcome. We're interested in how people are watching movies this year.\nThanks for your time. - The WRITERS GUILD OF AMERICA.\nPlease tell us about how you've watched movies in the last month.\nHow many movies have you seen at the cinema?\nHow many movies have you seen using a DVD or VHS player?\nHow many movies have you seen using a Computer?\nSummary: 1 Cinema movies, 101 DVD/VHS movies, 98 Computer movies\nTotal: 200 movies\nFraction of movies seen at a cinema: 0.50%\nFraction of movies seen outside of a cinema: 99.50%\n";
   MovieSurvey.main(new String[0]);
   int line = CheckInputOutput.checkCompleteOutput(expected);
   if (line > 0) fail("Review incorrect output on line" + line);
 }
Ejemplo n.º 2
0
 public void setUp() throws Exception {
   super.setUp();
   CheckInputOutput.setUp();
 }
Ejemplo n.º 3
0
 public void setUp() throws Exception {
   CheckInputOutput.setUp();
   Locale.setDefault(Locale.US);
   super.setUp();
 }
Ejemplo n.º 4
0
 public void tearDown() {
   CheckInputOutput.resetInputOutput();
 }
Ejemplo n.º 5
0
 public void testAuthorship() {
   boolean success = CheckInputOutput.checkAuthorship("MovieSurvey.java");
   if (!success) fail("Fix @authorship");
 }
Ejemplo n.º 6
0
 protected void tearDown() throws Exception {
   CheckInputOutput.resetInputOutput();
 }