diff -r e5618cc85d74 -r 6c158198356e javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/applicationregistrator/SifRegistratorTest.java --- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/applicationregistrator/SifRegistratorTest.java Thu Jul 15 18:31:06 2010 +0300 +++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/applicationregistrator/SifRegistratorTest.java Thu Aug 19 09:48:13 2010 +0300 @@ -203,21 +203,34 @@ { SuiteInfo si = getTestSuite(); ComponentId cid = getComponentId(si.getGlobalId()); - Uid uid = null; - //Uid uid = sifReg.getUid(cid.getId()); - //assertTrue("Suite uid " + si.getUid() + " does not match" + - // " to uid " + uid + " from SCR", - // si.getUid().equals(uid)); - Vector apps = si.getApplications(); - for (int i = 0; i < apps.size(); i++) - { - cid = getComponentId(si.getGlobalId(i)); - uid = sifReg.getUid(cid.getId()); - assertTrue("Application uid " + - ((ApplicationInfo)apps.elementAt(i)).getUid() + - " does not match to uid " + uid + " from SCR", - ((ApplicationInfo)apps.elementAt(i)).getUid().equals(uid)); - } + + // Check for USIF Phase 2 registration. + Uid uid = sifReg.getUid(cid.getId()); + assertTrue("Suite uid " + si.getUid() + " does not match" + + " to uid " + uid + " from SCR", + si.getUid().equals(uid)); + + Uid appUid = PlatformUid.createUid("[e0001001]"); + sifReg.startSession(false); + ComponentId cidForApp = sifReg.getComponentId(appUid); + sifReg.closeSession(); + assertTrue("Null component id from SCR for application uid " + + appUid, cidForApp != null); + assertTrue("Component id " + cid + " does not match" + + " to uid " + cidForApp + " from SCR", + cid.getId() == cidForApp.getId()); + + // Check for USIF Phase 1 registration. + //Vector apps = si.getApplications(); + //for (int i = 0; i < apps.size(); i++) + //{ + // cid = getComponentId(si.getGlobalId(i)); + // uid = sifReg.getUid(cid.getId()); + // assertTrue("Application uid " + + // ((ApplicationInfo)apps.elementAt(i)).getUid() + + // " does not match to uid " + uid + " from SCR", + // ((ApplicationInfo)apps.elementAt(i)).getUid().equals(uid)); + //} sifReg.closeSession(); } catch (InstallerException ie) @@ -324,16 +337,18 @@ private void assertSuiteExists(SuiteInfo aSuite, boolean aExists) { String not = (aExists? " not": ""); + // Check for USIF Phase 2 registration. ComponentId cid = getComponentId(aSuite.getGlobalId()); - //assertTrue("Suite " + aSuite.getGlobalId() + not + - // " found from SCR", (aExists? cid != null: cid == null)); - Vector apps = aSuite.getApplications(); - for (int i = 0; i < apps.size(); i++) - { - cid = getComponentId(aSuite.getGlobalId(i)); - assertTrue("Application " + aSuite.getGlobalId(i) + not + - " found from SCR", (aExists? cid != null: cid == null)); - } + assertTrue("Suite " + aSuite.getGlobalId() + not + + " found from SCR", (aExists? cid != null: cid == null)); + // Check for USIF Phase 1 registration. + //Vector apps = aSuite.getApplications(); + //for (int i = 0; i < apps.size(); i++) + //{ + // cid = getComponentId(aSuite.getGlobalId(i)); + // assertTrue("Application " + aSuite.getGlobalId(i) + not + + // " found from SCR", (aExists? cid != null: cid == null)); + //} } private void logSuite(SuiteInfo aSuite)