201 SifRegistrator sifReg = new SifRegistrator(); |
201 SifRegistrator sifReg = new SifRegistrator(); |
202 try |
202 try |
203 { |
203 { |
204 SuiteInfo si = getTestSuite(); |
204 SuiteInfo si = getTestSuite(); |
205 ComponentId cid = getComponentId(si.getGlobalId()); |
205 ComponentId cid = getComponentId(si.getGlobalId()); |
206 |
206 Uid uid = null; |
207 // Check for USIF Phase 2 registration. |
207 //Uid uid = sifReg.getUid(cid.getId()); |
208 Uid uid = sifReg.getUid(cid.getId()); |
208 //assertTrue("Suite uid " + si.getUid() + " does not match" + |
209 assertTrue("Suite uid " + si.getUid() + " does not match" + |
209 // " to uid " + uid + " from SCR", |
210 " to uid " + uid + " from SCR", |
210 // si.getUid().equals(uid)); |
211 si.getUid().equals(uid)); |
211 Vector apps = si.getApplications(); |
212 |
212 for (int i = 0; i < apps.size(); i++) |
213 Uid appUid = PlatformUid.createUid("[e0001001]"); |
213 { |
214 sifReg.startSession(false); |
214 cid = getComponentId(si.getGlobalId(i)); |
215 ComponentId cidForApp = sifReg.getComponentId(appUid); |
215 uid = sifReg.getUid(cid.getId()); |
216 sifReg.closeSession(); |
216 assertTrue("Application uid " + |
217 assertTrue("Null component id from SCR for application uid " + |
217 ((ApplicationInfo)apps.elementAt(i)).getUid() + |
218 appUid, cidForApp != null); |
218 " does not match to uid " + uid + " from SCR", |
219 assertTrue("Component id " + cid + " does not match" + |
219 ((ApplicationInfo)apps.elementAt(i)).getUid().equals(uid)); |
220 " to uid " + cidForApp + " from SCR", |
220 } |
221 cid.getId() == cidForApp.getId()); |
|
222 |
|
223 // Check for USIF Phase 1 registration. |
|
224 //Vector apps = si.getApplications(); |
|
225 //for (int i = 0; i < apps.size(); i++) |
|
226 //{ |
|
227 // cid = getComponentId(si.getGlobalId(i)); |
|
228 // uid = sifReg.getUid(cid.getId()); |
|
229 // assertTrue("Application uid " + |
|
230 // ((ApplicationInfo)apps.elementAt(i)).getUid() + |
|
231 // " does not match to uid " + uid + " from SCR", |
|
232 // ((ApplicationInfo)apps.elementAt(i)).getUid().equals(uid)); |
|
233 //} |
|
234 sifReg.closeSession(); |
221 sifReg.closeSession(); |
235 } |
222 } |
236 catch (InstallerException ie) |
223 catch (InstallerException ie) |
237 { |
224 { |
238 ie.printStackTrace(); |
225 ie.printStackTrace(); |
335 } |
322 } |
336 |
323 |
337 private void assertSuiteExists(SuiteInfo aSuite, boolean aExists) |
324 private void assertSuiteExists(SuiteInfo aSuite, boolean aExists) |
338 { |
325 { |
339 String not = (aExists? " not": ""); |
326 String not = (aExists? " not": ""); |
340 // Check for USIF Phase 2 registration. |
|
341 ComponentId cid = getComponentId(aSuite.getGlobalId()); |
327 ComponentId cid = getComponentId(aSuite.getGlobalId()); |
342 assertTrue("Suite " + aSuite.getGlobalId() + not + |
328 //assertTrue("Suite " + aSuite.getGlobalId() + not + |
343 " found from SCR", (aExists? cid != null: cid == null)); |
329 // " found from SCR", (aExists? cid != null: cid == null)); |
344 // Check for USIF Phase 1 registration. |
330 Vector apps = aSuite.getApplications(); |
345 //Vector apps = aSuite.getApplications(); |
331 for (int i = 0; i < apps.size(); i++) |
346 //for (int i = 0; i < apps.size(); i++) |
332 { |
347 //{ |
333 cid = getComponentId(aSuite.getGlobalId(i)); |
348 // cid = getComponentId(aSuite.getGlobalId(i)); |
334 assertTrue("Application " + aSuite.getGlobalId(i) + not + |
349 // assertTrue("Application " + aSuite.getGlobalId(i) + not + |
335 " found from SCR", (aExists? cid != null: cid == null)); |
350 // " found from SCR", (aExists? cid != null: cid == null)); |
336 } |
351 //} |
|
352 } |
337 } |
353 |
338 |
354 private void logSuite(SuiteInfo aSuite) |
339 private void logSuite(SuiteInfo aSuite) |
355 { |
340 { |
356 SifRegistrator sifReg = new SifRegistrator(); |
341 SifRegistrator sifReg = new SifRegistrator(); |