Search in sources :

Example 81 with Model

use of org.btrplace.model.Model in project scheduler by btrplace.

the class BtrpNumberTest method testNonViableAddition.

@Test(expectedExceptions = { UnsupportedOperationException.class })
public void testNonViableAddition() {
    BtrpNumber i = new BtrpNumber(5, BtrpNumber.Base.BASE_16);
    Model mo = new DefaultModel();
    BtrpElement j = new BtrpElement(BtrpOperand.Type.VM, "foo", mo.newVM());
    i.plus(j);
}
Also used : DefaultModel(org.btrplace.model.DefaultModel) Model(org.btrplace.model.Model) DefaultModel(org.btrplace.model.DefaultModel) Test(org.testng.annotations.Test)

Example 82 with Model

use of org.btrplace.model.Model in project scheduler by btrplace.

the class BtrpNumberTest method testNonViableGeq.

@Test(expectedExceptions = { UnsupportedOperationException.class })
public void testNonViableGeq() {
    BtrpNumber i = new BtrpNumber(5, BtrpNumber.Base.BASE_16);
    Model mo = new DefaultModel();
    BtrpElement j = new BtrpElement(BtrpOperand.Type.VM, "foo", mo.newVM());
    i.remainder(j);
}
Also used : DefaultModel(org.btrplace.model.DefaultModel) Model(org.btrplace.model.Model) DefaultModel(org.btrplace.model.DefaultModel) Test(org.testng.annotations.Test)

Example 83 with Model

use of org.btrplace.model.Model in project scheduler by btrplace.

the class BtrpNumberTest method testNonViablePower.

@Test(expectedExceptions = { UnsupportedOperationException.class })
public void testNonViablePower() {
    BtrpNumber i = new BtrpNumber(5, BtrpNumber.Base.BASE_16);
    Model mo = new DefaultModel();
    BtrpElement j = new BtrpElement(BtrpOperand.Type.VM, "foo", mo.newVM());
    i.power(j);
}
Also used : DefaultModel(org.btrplace.model.DefaultModel) Model(org.btrplace.model.Model) DefaultModel(org.btrplace.model.DefaultModel) Test(org.testng.annotations.Test)

Example 84 with Model

use of org.btrplace.model.Model in project scheduler by btrplace.

the class BtrpSetTest method testNonViableDivCauseType.

@Test(expectedExceptions = { UnsupportedOperationException.class })
public void testNonViableDivCauseType() {
    BtrpSet s = new BtrpSet(1, BtrpOperand.Type.NUMBER);
    Model mo = new DefaultModel();
    s.div(new BtrpElement(BtrpOperand.Type.VM, "V", mo.newVM()));
}
Also used : DefaultModel(org.btrplace.model.DefaultModel) Model(org.btrplace.model.Model) DefaultModel(org.btrplace.model.DefaultModel) Test(org.testng.annotations.Test)

Example 85 with Model

use of org.btrplace.model.Model in project scheduler by btrplace.

the class BtrpSetTest method testNonViableRemainderCauseType.

@Test(expectedExceptions = { UnsupportedOperationException.class })
public void testNonViableRemainderCauseType() {
    BtrpSet s = new BtrpSet(1, BtrpOperand.Type.NUMBER);
    Model mo = new DefaultModel();
    s.remainder(new BtrpElement(BtrpOperand.Type.VM, "V", mo.newVM()));
}
Also used : DefaultModel(org.btrplace.model.DefaultModel) Model(org.btrplace.model.Model) DefaultModel(org.btrplace.model.DefaultModel) Test(org.testng.annotations.Test)

Aggregations

Model (org.btrplace.model.Model)171 DefaultModel (org.btrplace.model.DefaultModel)157 Test (org.testng.annotations.Test)145 Node (org.btrplace.model.Node)91 VM (org.btrplace.model.VM)89 ReconfigurationPlan (org.btrplace.plan.ReconfigurationPlan)46 Mapping (org.btrplace.model.Mapping)41 HashSet (java.util.HashSet)39 ArrayList (java.util.ArrayList)30 SatConstraint (org.btrplace.model.constraint.SatConstraint)29 ShareableResource (org.btrplace.model.view.ShareableResource)27 Instance (org.btrplace.model.Instance)19 RelocatableVM (org.btrplace.scheduler.choco.transition.RelocatableVM)19 MigrateVM (org.btrplace.plan.event.MigrateVM)18 DefaultChocoScheduler (org.btrplace.scheduler.choco.DefaultChocoScheduler)18 BootableNode (org.btrplace.scheduler.choco.transition.BootableNode)17 ShutdownableNode (org.btrplace.scheduler.choco.transition.ShutdownableNode)17 MinMTTR (org.btrplace.model.constraint.MinMTTR)16 ChocoScheduler (org.btrplace.scheduler.choco.ChocoScheduler)16 BootVM (org.btrplace.scheduler.choco.transition.BootVM)16