Index: lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/AttachmentTest.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/Attic/AttachmentTest.java,v diff -u -r1.2 -r1.3 --- lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/AttachmentTest.java 5 Jul 2005 02:46:13 -0000 1.2 +++ lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/AttachmentTest.java 7 Jul 2005 02:22:50 -0000 1.3 @@ -23,8 +23,6 @@ //Populate an Attachment entity for test purposes AttachmentDao attachmentDao = (AttachmentDao) GenericObjectFactoryImpl.getInstance().lookup(AttachmentDao.class); Attachment instructions = new Attachment(); - instructions.setName("instructions"); - instructions.setType(false); attachmentDao.saveOrUpdate(instructions); AttachmentDao dao = (AttachmentDao) GenericObjectFactoryImpl.getInstance().lookup(AttachmentDao.class); @@ -34,8 +32,6 @@ //load Attachment reloaded = (Attachment) dao.getById(instructions.getId()); - assertEquals("persisted and reloaded byte array should be equal", "instructions", instructions.getName()); - //find List values = dao.findByNamedQuery("allAttachments"); assertTrue("find all result not containing object", values.contains(instructions)); Index: lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/ForumTest.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/Attic/ForumTest.java,v diff -u -r1.3 -r1.4 --- lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/ForumTest.java 5 Jul 2005 02:46:13 -0000 1.3 +++ lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/persistence/ForumTest.java 7 Jul 2005 02:22:50 -0000 1.4 @@ -35,24 +35,10 @@ AttachmentDao attachmentDao = (AttachmentDao) GenericObjectFactoryImpl.getInstance().lookup(AttachmentDao.class); Attachment instructions = new Attachment(); - instructions.setName("instructions"); - instructions.setType(true); + //instructions.setType(true); attachments.add(instructions); attachmentDao.saveOrUpdate(instructions); - /* - Attachment onLineInstructions = new Attachment(); - onLineInstructions.setData("on line instructions byte array".getBytes()); - instructions.setType("ONLINEINSTRUCTIONS"); - attachments.add(onLineInstructions); - attachmentDao.saveOrUpdate(onLineInstructions); - - Attachment offLineInstructions = new Attachment(); - offLineInstructions.setData("off line instructions byte array".getBytes()); - instructions.setType("OFFLINEINSTRUCTIONS"); - attachments.add(offLineInstructions); - attachmentDao.saveOrUpdate(offLineInstructions);*/ - entity.setAttachments(attachments); //save @@ -78,8 +64,6 @@ assertTrue("reloaded set does not contain instructions attachment", reloadedSet.contains(instructions)); Attachment[] child = (Attachment[]) reloadedSet.toArray(new Attachment[0]); - assertEquals("attachments type should be same", instructions.getType(), child[0].getType()); - assertEquals("attachment bytes should be the same", new String(instructions.getName()), new String(child[0].getName())); //find List values = dao.findByNamedQuery("allForums"); Index: lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/service/ForumManagerImplTest.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/service/Attic/ForumManagerImplTest.java,v diff -u -r1.4 -r1.5 --- lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/service/ForumManagerImplTest.java 5 Jul 2005 02:46:13 -0000 1.4 +++ lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/service/ForumManagerImplTest.java 7 Jul 2005 02:22:50 -0000 1.5 @@ -28,8 +28,6 @@ public void testCreateAndDeleteForum() throws PersistenceException { Map attachments = new HashMap(); Attachment attachment = new Attachment(); - attachment.setName("test"); - attachment.setType(Attachment.TYPE_ONLINE); attachments.put("test file", attachment); Forum forum = forumManager.createForum(this.getForum("TEST", new Long("1002"), true, true, false, "TEST INSTRUCTIONS", "TEST ONLINEINSTRUCTIONS", "TEST OFFLINEINSTRUCTIONS"), attachments, null); @@ -45,9 +43,6 @@ assertEquals(reloadedForum.getOfflineInstructions(), "TEST OFFLINEINSTRUCTIONS"); Set reloadedAttachments = reloadedForum.getAttachments(); Attachment reloadedAttachment = (Attachment) (reloadedAttachments.toArray(new Attachment[0]))[0]; - assertEquals(reloadedAttachment.getType(), attachment.getType()); - assertEquals(new String(reloadedAttachment.getName()), new String(attachment.getName())); - assertTrue("Forum should contains attachment", reloadedAttachments.contains(attachment)); forumManager.deleteForum(forum.getId());