@Test public void createClass() throws Exception { Map<String, String> KillarneyClasses = new HashMap<String, String>(); KillarneyClasses.put("ClassName", "Sports and GT"); KillarneyClasses.put("ClassCode", "S>"); KillarneyClasses.put("ClassName", "V8 Masters"); KillarneyClasses.put("ClassCode", "V8M"); Classes class1 = ClassesFactory.createClass(KillarneyClasses); Assert.assertEquals("S>", class1.getClassCode()); }
@Test public void updateClass() throws Exception { Map<String, String> KillarneyClasses = new HashMap<String, String>(); KillarneyClasses.put("ClassName", "Sports and GT"); KillarneyClasses.put("ClassCode", "S>"); KillarneyClasses.put("ClassName", "V8 Masters"); KillarneyClasses.put("ClassCode", "V8M"); Classes class1 = ClassesFactory.createClass(KillarneyClasses); Classes class2 = new Classes.Builder(class1.getClassCode()).copy(class1).classCode("MV8").build(); Assert.assertEquals("S>", class1.getClassCode()); Assert.assertEquals("MV8", class2.getClassCode()); }