javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistratorTest.java
changeset 35 85266cc22c7f
parent 23 98ccebc37403
child 83 26b2b12093af
child 87 1627c337e51e
equal deleted inserted replaced
26:dc7c549001d5 35:85266cc22c7f
   372             String groupName = "";
   372             String groupName = "";
   373             boolean uidInUse = false;
   373             boolean uidInUse = false;
   374 
   374 
   375             appReg.startSession();
   375             appReg.startSession();
   376             groupName = appReg.getGroupName(uid);
   376             groupName = appReg.getGroupName(uid);
   377             assertTrue(
   377             if (SifRegistrator.getSifMode() > 0)
   378                 "The group name was not VeryVeryLongGrou, it was " + groupName,
   378             {
   379                 "VeryVeryLongGrou".equals(groupName));
   379                 // When USIF is in use ApplicationRegistrator should not
       
   380                 // have registered anything.
       
   381                 assertTrue(
       
   382                     "The group name was not empty, it was " + groupName,
       
   383                     "".equals(groupName));
       
   384             }
       
   385             else
       
   386             {
       
   387                 assertTrue(
       
   388                     "The group name was not VeryVeryLongGrou, it was " + groupName,
       
   389                     "VeryVeryLongGrou".equals(groupName));
       
   390             }
   380 
   391 
   381             uidInUse = appReg.uidInUse(uid);
   392             uidInUse = appReg.uidInUse(uid);
   382             assertTrue("uidInUse returned false value", true == uidInUse);
   393             if (SifRegistrator.getSifMode() > 0)
       
   394             {
       
   395                 // When USIF is in use ApplicationRegistrator should not
       
   396                 // have registered anything.
       
   397                 assertTrue("uidInUse returned true value", false == uidInUse);
       
   398             }
       
   399             else
       
   400             {
       
   401                 assertTrue("uidInUse returned false value", true == uidInUse);
       
   402             }
   383 
   403 
   384             appReg.closeSession();
   404             appReg.closeSession();
   385         }
   405         }
   386         catch (InstallerException ie)
   406         catch (InstallerException ie)
   387         {
   407         {
   580             assertTrue(
   600             assertTrue(
   581                 "The group name was not empty, it was " + groupName,
   601                 "The group name was not empty, it was " + groupName,
   582                 "".equals(groupName));
   602                 "".equals(groupName));
   583 
   603 
   584             uidInUse = appReg.uidInUse(uid);
   604             uidInUse = appReg.uidInUse(uid);
   585             assertTrue("uidInUse returned false value", true == uidInUse);
   605             if (SifRegistrator.getSifMode() > 0)
       
   606             {
       
   607                 // When USIF is in use ApplicationRegistrator should not
       
   608                 // have registered anything.
       
   609                 assertTrue("uidInUse returned true value", false == uidInUse);
       
   610             }
       
   611             else
       
   612             {
       
   613                 assertTrue("uidInUse returned false value", true == uidInUse);
       
   614             }
   586 
   615 
   587             appReg.closeSession();
   616             appReg.closeSession();
   588         }
   617         }
   589         catch (InstallerException ie)
   618         catch (InstallerException ie)
   590         {
   619         {
   701             String groupName = "";
   730             String groupName = "";
   702             boolean uidInUse = false;
   731             boolean uidInUse = false;
   703 
   732 
   704             appReg.startSession();
   733             appReg.startSession();
   705             groupName = appReg.getGroupName(uid);
   734             groupName = appReg.getGroupName(uid);
   706             assertTrue(
   735             if (SifRegistrator.getSifMode() > 0)
   707                 "The group name was not Suite, it was " + groupName,
   736             {
   708                 "Suite".equals(groupName));
   737                 // When USIF is in use ApplicationRegistrator should not
       
   738                 // have registered anything.
       
   739                 assertTrue(
       
   740                     "The group name was not empty, it was " + groupName,
       
   741                     "".equals(groupName));
       
   742             }
       
   743             else
       
   744             {
       
   745                 assertTrue(
       
   746                     "The group name was not Suite, it was " + groupName,
       
   747                     "Suite".equals(groupName));
       
   748             }
   709 
   749 
   710             uidInUse = appReg.uidInUse(uid);
   750             uidInUse = appReg.uidInUse(uid);
   711             assertTrue("uidInUse returned false value", true == uidInUse);
   751             if (SifRegistrator.getSifMode() > 0)
       
   752             {
       
   753                 // When USIF is in use ApplicationRegistrator should not
       
   754                 // have registered anything.
       
   755                 assertTrue("uidInUse returned true value", false == uidInUse);
       
   756             }
       
   757             else
       
   758             {
       
   759                 assertTrue("uidInUse returned false value", true == uidInUse);
       
   760             }
   712 
   761 
   713             appReg.closeSession();
   762             appReg.closeSession();
   714         }
   763         }
   715         catch (InstallerException ie)
   764         catch (InstallerException ie)
   716         {
   765         {