1 21 22 package org.opensubsystems.core.util; 23 24 import java.util.ArrayList ; 25 import java.util.List ; 26 27 import junit.framework.TestCase; 28 29 37 public class FileCommitUtilsTest extends TestCase 38 { 39 40 43 protected FileCommitUtils m_fcuFileTrancastion; 44 45 49 public FileCommitUtilsTest( 50 String arg0 51 ) 52 { 53 super(arg0); 54 55 59 TwoObjectStruct tosSourceNewFile = new TwoObjectStruct( 62 "TODO: Bug: Missing file - filetransaction/temp/", 63 "test_file_new.pdf"); 64 TwoObjectStruct tosSourceNewFilePage1JPG = new TwoObjectStruct( 65 "TODO: Bug: Missing file - filetransaction/temp/", 66 "test_page_1_new.jpg"); 67 TwoObjectStruct tosSourceNewFilePage1TIF = new TwoObjectStruct( 68 "TODO: Bug: Missing file - filetransaction/temp/", 69 "test_page_1_new.tif"); 70 TwoObjectStruct tosSourceNewFilePage1THM = new TwoObjectStruct( 71 "TODO: Bug: Missing file - filetransaction/temp/", 72 "test_page_1_thm_new.jpg"); 73 TwoObjectStruct tosSourceNewFilePage2JPG = new TwoObjectStruct( 74 "TODO: Bug: Missing file - filetransaction/temp/", 75 "test_page_2_new.jpg"); 76 TwoObjectStruct tosSourceNewFilePage2TIF = new TwoObjectStruct( 77 "TODO: Bug: Missing file - filetransaction/temp/", 78 "test_page_2_new.tif"); 79 TwoObjectStruct tosSourceNewFilePage2THM = new TwoObjectStruct( 80 "TODO: Bug: Missing file - filetransaction/temp/", 81 "test_page_2_thm_new.jpg"); 82 83 TwoObjectStruct tosDestinationNewFile = new TwoObjectStruct( 85 "TODO: Bug: Missing file - filetransaction/testfiles/", 86 "test_file_2_new_copyied.pdf"); 87 TwoObjectStruct tosDestinationNewFilePage1JPG = new TwoObjectStruct( 88 "TODO: Bug: Missing file - filetransaction/testfilepages/", 89 "test_page_2_1_new_copyied.jpg"); 90 TwoObjectStruct tosDestinationNewFilePage1TIF = new TwoObjectStruct( 91 "TODO: Bug: Missing file - filetransaction/testfilepages/", 92 "test_page_2_1_new_copyied.tif"); 93 TwoObjectStruct tosDestinationNewFilePage1THM = new TwoObjectStruct( 94 "TODO: Bug: Missing file - filetransaction/testfilepages/", 95 "test_page_2_1_thm_new_copyied.jpg"); 96 TwoObjectStruct tosDestinationNewFilePage2JPG = new TwoObjectStruct( 97 "TODO: Bug: Missing file - filetransaction/testfilepages/", 98 "test_page_2_2_new_copyied.jpg"); 99 TwoObjectStruct tosDestinationNewFilePage2TIF = new TwoObjectStruct( 100 "TODO: Bug: Missing file - filetransaction/testfilepages/", 101 "test_page_2_2_new_copyied.tif"); 102 TwoObjectStruct tosDestinationNewFilePage2THM = new TwoObjectStruct( 103 "TODO: Bug: Missing file - filetransaction/testfilepages/", 104 "test_page_2_2_thm_new_copyied.jpg"); 105 106 TwoObjectStruct tosSourceMoveFile = new TwoObjectStruct( 108 "TODO: Bug: Missing file - filetransaction/temp/", 109 "test_file_move.pdf"); 110 TwoObjectStruct tosSourceMovePage1JPG = new TwoObjectStruct( 111 "TODO: Bug: Missing file - filetransaction/temp/", 112 "test_page_8_move.jpg"); 113 TwoObjectStruct tosSourceMovePage1TIF = new TwoObjectStruct( 114 "TODO: Bug: Missing file - filetransaction/temp/", 115 "test_page_8_move.tif"); 116 TwoObjectStruct tosSourceMovePage1THM = new TwoObjectStruct( 117 "TODO: Bug: Missing file - filetransaction/temp/", 118 "test_page_8_thm_move.jpg"); 119 120 TwoObjectStruct tosDestinationMoveFile = new TwoObjectStruct( 122 "TODO: Bug: Missing file - filetransaction/testfiles/", 123 "test_file_1_moved.pdf"); 124 TwoObjectStruct tosDestinationMovePage1JPG = new TwoObjectStruct( 125 "TODO: Bug: Missing file - filetransaction/testfilepages/", 126 "test_page_8_moved.jpg"); 127 TwoObjectStruct tosDestinationMovePage1TIF = new TwoObjectStruct( 128 "TODO: Bug: Missing file - filetransaction/testfilepages/", 129 "test_page_8_moved.tif"); 130 TwoObjectStruct tosDestinationMovePage1THM = new TwoObjectStruct( 131 "TODO: Bug: Missing file - filetransaction/testfilepages/", 132 "test_page_8_thm_moved.jpg"); 133 134 TwoObjectStruct tosSourceReplaceFile = new TwoObjectStruct( 136 "TODO: Bug: Missing file - filetransaction/temp/", 137 "test_file_replace.pdf"); 138 TwoObjectStruct tosSourceReplacePage1JPG = new TwoObjectStruct( 139 "TODO: Bug: Missing file - filetransaction/temp/", 140 "test_page_6_replace.jpg"); 141 TwoObjectStruct tosSourceReplacePage1TIF = new TwoObjectStruct( 142 "TODO: Bug: Missing file - filetransaction/temp/", 143 "test_page_6_replace.tif"); 144 TwoObjectStruct tosSourceReplacePage1THM = new TwoObjectStruct( 145 "TODO: Bug: Missing file - filetransaction/temp/", 146 "test_page_6_thm_replace.jpg"); 147 148 TwoObjectStruct tosDestinationReplaceFile = new TwoObjectStruct( 150 "TODO: Bug: Missing file - filetransaction/testfiles/", 151 "test_file_1_to_be_replaced.pdf"); 152 TwoObjectStruct tosDestinationReplacePage1JPG = new TwoObjectStruct( 153 "TODO: Bug: Missing file - filetransaction/testfilepages/", 154 "test_page_6_to_be_replaced.jpg"); 155 TwoObjectStruct tosDestinationReplacePage1TIF = new TwoObjectStruct( 156 "TODO: Bug: Missing file - filetransaction/testfilepages/", 157 "test_page_6_to_be_replaced.tif"); 158 TwoObjectStruct tosDestinationReplacePage1THM = new TwoObjectStruct( 159 "TODO: Bug: Missing file - filetransaction/testfilepages/", 160 "test_page_6_thm_to_be_replaced.jpg"); 161 162 TwoObjectStruct tosSourceDeletePage1JPG = new TwoObjectStruct( 164 "TODO: Bug: Missing file - filetransaction/testfilepages/", 165 "test_page_7_delete.jpg"); 166 TwoObjectStruct tosSourceDeletePage1TIF = new TwoObjectStruct( 167 "TODO: Bug: Missing file - filetransaction/testfilepages/", 168 "test_page_7_delete.tif"); 169 TwoObjectStruct tosSourceDeletePage1THM = new TwoObjectStruct( 170 "TODO: Bug: Missing file - filetransaction/testfilepages/", 171 "test_page_7_thm_delete.jpg"); 172 173 List lstCopyFilesFrom = new ArrayList (7); 177 List lstCopyFilesTo = new ArrayList (7); 178 179 List lstMoveFilesFrom = new ArrayList (4); 180 List lstMoveFilesTo = new ArrayList (4); 181 182 List lstReplaceFilesFrom = new ArrayList (4); 183 List lstReplaceFilesTo = new ArrayList (4); 184 List lstDeleteFilesFrom = new ArrayList (3); 185 186 lstCopyFilesFrom.add(tosSourceNewFile); 187 lstCopyFilesFrom.add(tosSourceNewFilePage1JPG); 188 lstCopyFilesFrom.add(tosSourceNewFilePage1TIF); 189 lstCopyFilesFrom.add(tosSourceNewFilePage1THM); 190 lstCopyFilesFrom.add(tosSourceNewFilePage2JPG); 191 lstCopyFilesFrom.add(tosSourceNewFilePage2TIF); 192 lstCopyFilesFrom.add(tosSourceNewFilePage2THM); 193 194 lstCopyFilesTo.add(tosDestinationNewFile); 195 lstCopyFilesTo.add(tosDestinationNewFilePage1JPG); 196 lstCopyFilesTo.add(tosDestinationNewFilePage1TIF); 197 lstCopyFilesTo.add(tosDestinationNewFilePage1THM); 198 lstCopyFilesTo.add(tosDestinationNewFilePage2JPG); 199 lstCopyFilesTo.add(tosDestinationNewFilePage2TIF); 200 lstCopyFilesTo.add(tosDestinationNewFilePage2THM); 201 202 lstMoveFilesFrom.add(tosSourceMoveFile); 203 lstMoveFilesFrom.add(tosSourceMovePage1JPG); 204 lstMoveFilesFrom.add(tosSourceMovePage1TIF); 205 lstMoveFilesFrom.add(tosSourceMovePage1THM); 206 207 lstMoveFilesTo.add(tosDestinationMoveFile); 208 lstMoveFilesTo.add(tosDestinationMovePage1JPG); 209 lstMoveFilesTo.add(tosDestinationMovePage1TIF); 210 lstMoveFilesTo.add(tosDestinationMovePage1THM); 211 212 lstReplaceFilesFrom.add(tosSourceReplaceFile); 213 lstReplaceFilesFrom.add(tosSourceReplacePage1JPG); 214 lstReplaceFilesFrom.add(tosSourceReplacePage1TIF); 215 lstReplaceFilesFrom.add(tosSourceReplacePage1THM); 216 217 lstReplaceFilesTo.add(tosDestinationReplaceFile); 218 lstReplaceFilesTo.add(tosDestinationReplacePage1JPG); 219 lstReplaceFilesTo.add(tosDestinationReplacePage1TIF); 220 lstReplaceFilesTo.add(tosDestinationReplacePage1THM); 221 222 lstDeleteFilesFrom.add(tosSourceDeletePage1JPG); 223 lstDeleteFilesFrom.add(tosSourceDeletePage1TIF); 224 lstDeleteFilesFrom.add(tosSourceDeletePage1THM); 225 226 this.m_fcuFileTrancastion = new FileCommitUtils(FileCommitUtils.RC_OK_OBJ, 230 lstCopyFilesFrom, 231 lstCopyFilesTo, 232 lstMoveFilesFrom, 233 lstMoveFilesTo, 234 lstReplaceFilesFrom, 235 lstReplaceFilesTo, 236 lstDeleteFilesFrom, 237 true); 238 } 239 240 245 protected void setUp( 246 ) throws Exception 247 { 248 super.setUp(); 249 } 250 251 256 protected void tearDown( 257 ) throws Exception 258 { 259 super.tearDown(); 260 } 261 262 267 public void testDummy( 268 ) throws Exception 269 { 270 } 272 } 273 | Popular Tags |