123124125126127128129130131132133
@Test public void testAddExample() { Category c = new Category("test"); try { c.addExample(new Gesture("testKIKI", null)); } catch (Exception e) { if (e.getMessage().indexOf("Prototype name") != -1) { return; }
152153154155156157158159160161162
} catch (Exception e1) { fail("exception in initialising a category with prototypes"); } try { c.addExample(new Gesture("test5", null)); } catch (Exception e) { if (e.getMessage().indexOf("Prototype name") != -1) { return; }
165166167168169170171172173174175
} if (c.getExamples() != 6) { fail("error in adding examples"); } try { c.addExample(new Gesture("test5", null)); } catch (Exception e) { if (e.getMessage().indexOf("Prototype name") != -1) { return; }