@Test public void testDoesNotCreateGroupsAtStartupIfAlreadyCreated() throws Exception { context.checking(new Expectations() {{ oneOf(db).containsGroup(txn, localGroup.getId()); will(returnValue(true)); }}); ClientVersioningManagerImpl c = createInstance(); c.createLocalState(txn); }
@Override public void createLocalState(Transaction txn) throws DbException { if (db.containsGroup(txn, localGroup.getId())) return; db.addGroup(txn, localGroup); for (Contact c : db.getContacts(txn)) addingContact(txn, c); }
ClientVersioningManagerImpl implements ClientVersioningManager, Client,
		Service, ContactHook, IncomingMessageHook { @Override public void createLocalState(Transaction txn) throws DbException { if (db.containsGroup(txn, localGroup.getId())) return; db.addGroup(txn, localGroup); for (Contact c : db.getContacts(txn)) addingContact(txn, c); } }
ClientVersioningManagerImpl implements ClientVersioningManager, Client,
		Service, ContactHook, IncomingMessageHook { @Override public void createLocalState(Transaction txn) throws DbException { if (db.containsGroup(txn, localGroup.getId())) return; db.addGroup(txn, localGroup); for (Contact c : db.getContacts(txn)) addingContact(txn, c); } @Inject  ClientVersioningManagerImpl(DatabaseComponent db, ClientHelper clientHelper,
			ContactGroupFactory contactGroupFactory, Clock clock); }
ClientVersioningManagerImpl implements ClientVersioningManager, Client,
		Service, ContactHook, IncomingMessageHook { @Override public void createLocalState(Transaction txn) throws DbException { if (db.containsGroup(txn, localGroup.getId())) return; db.addGroup(txn, localGroup); for (Contact c : db.getContacts(txn)) addingContact(txn, c); } @Inject  ClientVersioningManagerImpl(DatabaseComponent db, ClientHelper clientHelper,
			ContactGroupFactory contactGroupFactory, Clock clock); @Override void registerClient(ClientId clientId, int majorVersion,
			int minorVersion, ClientVersioningHook hook); @Override Visibility getClientVisibility(Transaction txn, ContactId contactId,
			ClientId clientId, int majorVersion); @Override void createLocalState(Transaction txn); @Override void startService(); @Override void stopService(); @Override void addingContact(Transaction txn, Contact c); @Override void removingContact(Transaction txn, Contact c); @Override boolean incomingMessage(Transaction txn, Message m, Metadata meta); }
ClientVersioningManagerImpl implements ClientVersioningManager, Client,
		Service, ContactHook, IncomingMessageHook { @Override public void createLocalState(Transaction txn) throws DbException { if (db.containsGroup(txn, localGroup.getId())) return; db.addGroup(txn, localGroup); for (Contact c : db.getContacts(txn)) addingContact(txn, c); } @Inject  ClientVersioningManagerImpl(DatabaseComponent db, ClientHelper clientHelper,
			ContactGroupFactory contactGroupFactory, Clock clock); @Override void registerClient(ClientId clientId, int majorVersion,
			int minorVersion, ClientVersioningHook hook); @Override Visibility getClientVisibility(Transaction txn, ContactId contactId,
			ClientId clientId, int majorVersion); @Override void createLocalState(Transaction txn); @Override void startService(); @Override void stopService(); @Override void addingContact(Transaction txn, Contact c); @Override void removingContact(Transaction txn, Contact c); @Override boolean incomingMessage(Transaction txn, Message m, Metadata meta);  }