Example #1
0
 @Test
 public void testCreateWithDelegate_UUID() throws Exception {
   UUID uuid = UUID.nameUUIDFromBytes("uuid".getBytes());
   BiochemicalReaction rxn = BiochemRxnImpl.createWithDelegate(uuid);
   assertNotNull(rxn.getMetabolicReaction());
   assertThat(rxn.getMetabolicReaction().uuid(), is(uuid));
 }
Example #2
0
  @Test(expected = UnsupportedOperationException.class)
  @SuppressWarnings("unchecked")
  public void testEncapsulatedModifiers() throws Exception {
    Collection modifiers = mock(Collection.class);
    BiochemicalReaction rxn = new BiochemRxnImpl(mock(MetabolicReaction.class), modifiers);

    rxn.getModifiers().add(mock(GeneProduct.class));
  }
Example #3
0
 @Test
 public void testCreateWithDelegate_Name() throws Exception {
   Identifier id = mock(Identifier.class);
   BiochemicalReaction rxn = BiochemRxnImpl.createWithDelegate(id, "abrv", "name");
   assertNotNull(rxn.getMetabolicReaction());
   assertThat(rxn.getMetabolicReaction().getIdentifier(), is(id));
   assertThat(rxn.getMetabolicReaction().getAbbreviation(), is("abrv"));
   assertThat(rxn.getMetabolicReaction().getName(), is("name"));
 }
Example #4
0
  @Test
  @SuppressWarnings("unchecked")
  public void testRemoveModifiers() throws Exception {
    Collection modifiers = mock(Collection.class);
    BiochemicalReaction rxn = new BiochemRxnImpl(mock(MetabolicReaction.class), modifiers);

    GeneProduct gp = mock(GeneProduct.class);
    rxn.removeModifier(gp);
    verify(modifiers).remove(gp);
  }
Example #5
0
 @Test
 public void testCreateWithDelegate() throws Exception {
   BiochemicalReaction rxn = BiochemRxnImpl.createWithDelegate();
   assertNotNull(rxn.getMetabolicReaction());
 }