@Test public void testAddPartnership () throws AS2Exception { final Partnership partnership = new Partnership ("Test partnership"); assertTrue (mongoDBPartnershipFactory.addPartnership (partnership).isChanged ()); assertEquals (1, collection.countDocuments ()); assertNotNull (mongoDBPartnershipFactory.getPartnershipByName ("Test partnership")); }
@Override public EChange addPartnership (final Partnership aPartnership) throws AS2Exception { m_aPartnerships.insertOne (_toDocument (aPartnership)); return EChange.CHANGED; }
MongoDBPartnershipFactory extends AbstractDynamicComponent implements IPartnershipFactory { @Override public EChange addPartnership (final Partnership aPartnership) throws AS2Exception { m_aPartnerships.insertOne (_toDocument (aPartnership)); return EChange.CHANGED; } }
MongoDBPartnershipFactory extends AbstractDynamicComponent implements IPartnershipFactory { @Override public EChange addPartnership (final Partnership aPartnership) throws AS2Exception { m_aPartnerships.insertOne (_toDocument (aPartnership)); return EChange.CHANGED; } MongoDBPartnershipFactory(final MongoCollection <Document> aPartnerships, final Logger aLogger); }
MongoDBPartnershipFactory extends AbstractDynamicComponent implements IPartnershipFactory { @Override public EChange addPartnership (final Partnership aPartnership) throws AS2Exception { m_aPartnerships.insertOne (_toDocument (aPartnership)); return EChange.CHANGED; } MongoDBPartnershipFactory(final MongoCollection <Document> aPartnerships, final Logger aLogger); @Override EChange addPartnership(final Partnership aPartnership); @Override EChange removePartnership(final Partnership aPartnership); @Override void updatePartnership(final IMessage aMsg, final boolean bOverwrite); @Override void updatePartnership(final IMessageMDN aMdn, final boolean bOverwrite); @Override Partnership getPartnership(final Partnership aPartnership); @Override Partnership getPartnershipByName(final String sName); @Override ICommonsSet <String> getAllPartnershipNames(); @Override ICommonsList <Partnership> getAllPartnerships(); }
MongoDBPartnershipFactory extends AbstractDynamicComponent implements IPartnershipFactory { @Override public EChange addPartnership (final Partnership aPartnership) throws AS2Exception { m_aPartnerships.insertOne (_toDocument (aPartnership)); return EChange.CHANGED; } MongoDBPartnershipFactory(final MongoCollection <Document> aPartnerships, final Logger aLogger); @Override EChange addPartnership(final Partnership aPartnership); @Override EChange removePartnership(final Partnership aPartnership); @Override void updatePartnership(final IMessage aMsg, final boolean bOverwrite); @Override void updatePartnership(final IMessageMDN aMdn, final boolean bOverwrite); @Override Partnership getPartnership(final Partnership aPartnership); @Override Partnership getPartnershipByName(final String sName); @Override ICommonsSet <String> getAllPartnershipNames(); @Override ICommonsList <Partnership> getAllPartnerships();  }