jsbml icon indicating copy to clipboard operation
jsbml copied to clipboard

Removing objectives from a model is not sensitive for removal of the active objective

Open Schmoho opened this issue 3 years ago • 0 comments

Test to reproduce:

   @Test
    public void test() {
        var m = new Model(3,2);
        var fbcPlugin = (FBCModelPlugin) m.getPlugin(FBCConstants.shortLabel);

        var o1 = fbcPlugin.createObjective("obj1");
        fbcPlugin.setActiveObjective(o1);

        fbcPlugin.getListOfObjectives().removeAll(fbcPlugin.getListOfObjectives());

        assertTrue(fbcPlugin.isSetActiveObjective());
        assertEquals("obj1", fbcPlugin.getActiveObjective());
        assertEquals(0, fbcPlugin.getObjectiveCount());
    }

Schmoho avatar Aug 02 '22 10:08 Schmoho