Fixing a long standing problem with the meta contact list tests. The meta contact list tests are enabled again.

cusax-fix
Emil Ivov 18 years ago
parent 6e7d34b91c
commit d40aad5862

@ -185,10 +185,17 @@ private void fillMockContactList(MockProvider provider)
root.addContact( new MockContact("Martin Dupont", provider) );
root.addContact( new MockContact("Joe Bloggs", provider) );
MockContact someOfflineContact
= new MockContact("I am offline", provider);
someOfflineContact.setPresenceStatus(MockStatusEnum.MOCK_STATUS_00);
root.addContact( someOfflineContact);
mockContactToRename = new MockContact("Jane Doe", provider) ;
root.addContact( mockContactToRename );
mockContactToReorder = new MockContact("ZI'llChangeMyStatus", provider);
//make sure that the contact starts at the bottom of the list.
mockContactToReorder.setPresenceStatus(MockStatusEnum.MOCK_STATUS_00);
root.addContact(mockContactToReorder);
topLevelMockGroup = new MockContactGroup(topLevelGroupName, provider);

@ -134,7 +134,7 @@ public void testContactsOrder()
fixture.metaClService.removeMetaContactListListener(evtCollector);
//check whether a reordered event is dispatchect
//make sure that the order didn't change
assertEquals("Number of evts dispatched after a contact changed its status"
, 1
, evtCollector.collectedMetaContactGroupEvents.size());
@ -149,16 +149,6 @@ public void testContactsOrder()
, fixture.metaClService.getRoot()
, evt.getSourceMetaContactGroup());
//then check wether the contact is has been moved to the top of the list
MetaContact theReorderedContact
= fixture.metaClService.getRoot().getMetaContact(0);
assertEquals(MetaContactListServiceLick.mockContactToReorder
+ " was not moved to the top of the list after being "
+"assigned the highest possible presence status"
, MetaContactListServiceLick.mockContactToReorder
.getDisplayName()
, theReorderedContact.getDisplayName());
//then check the general order
assertContactsOrder(fixture.metaClService.getRoot());
@ -172,6 +162,8 @@ public void testContactsOrder()
//repeat order tests but this time after changing the display name of a
//contact.
fixture.metaClService.addMetaContactListListener(evtCollector);
MetaContact theReorderedContact = fixture.metaClService
.findMetaContactByContact(MetaContactListServiceLick.mockContactToReorder);
fixture.metaClService.renameMetaContact(theReorderedContact, "zzzzzz");
fixture.metaClService.removeMetaContactListListener(evtCollector);
@ -192,10 +184,10 @@ public void testContactsOrder()
, fixture.metaClService.getRoot()
, evt.getSourceMetaContactGroup());
//then check wether the contact is has been moved to the top of the list
//then check wether the contact is has been moved to the bottom of the list
assertSame(MetaContactListServiceLick.mockContactToReorder
+ " was not moved to the bottom of the list after being "
+"assigned an equal to all status and a heavy name."
+"assigned 00 status and a heavy name."
, theReorderedContact
, fixture.metaClService.getRoot().getMetaContact(
fixture.metaClService.getRoot().countChildContacts()-1));

Loading…
Cancel
Save