コード例 #1
0
 public void testBookPrintsWhatAsked() {
   IOStub alexander = new IOStub();
   Bibmakeupartist mu = new Bibmakeupartist(alexander);
   List<Entry> entries = new ArrayList<Entry>();
   entries.add(Build.Book("lol", "karhu", "uli", 1556, "sinep"));
   mu.printSexyStringsToUser(entries);
   String output = "";
   for (String string : alexander.getOutput()) {
     output += string;
   }
   assertTrue(output.contains("uli"));
 }
コード例 #2
0
 public void testInproceedingsPrintsWhatAsked() {
   IOStub alexander = new IOStub();
   Bibmakeupartist mu = new Bibmakeupartist(alexander);
   List<Entry> entries = new ArrayList<Entry>();
   entries.add(Build.Inproceedings("lol", "karhu", "uli", 1556, "sinep"));
   entries.get(0).list.put(Edition.class, new Edition("edition"));
   entries.get(0).list.put(Series.class, new Series("serie"));
   mu.printSexyStringsToUser(entries);
   String output = "";
   for (String string : alexander.getOutput()) {
     output += string;
   }
   assertTrue(output.contains("karhu"));
   assertTrue(output.contains("serie"));
   assertTrue(output.contains("edition"));
 }