Examples of saveSettings()


Examples of org.openbp.cockpit.generator.Generator.saveSettings()

        {
          // Generator, but also creating an item
          save = true;
        }

        selectedGenerator.saveSettings(context);
      }

      if (save)
      {
        Item item = context.getItem();
View Full Code Here

Examples of org.virtualbox_4_0.IMachine.saveSettings()

    mm.setName("iosgi-" + Long.toHexString(System.currentTimeMillis()));
    mm.getNetworkAdapter(0L).setMACAddress(getRandomMACAddress());
    IMedium medium = vbox.openMedium(image.getAbsolutePath(),
        DeviceType.DVD, AccessMode.ReadOnly);
    mm.mountMedium("IDE-Controller", 1, 0, medium, true);
    mm.saveSettings();
    s.unlockMachine();
    return machine;
  }

  Client getOutpost(ISession session, IVirtualBox vbox) throws Exception {
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      String controllerName = "IDE Controller";
      StorageController storageController = StorageController.builder().bus(StorageBus.IDE).name(controllerName).build();

      expect(vm.addStorageController(controllerName, StorageBus.IDE)).andReturn(
              createNiceMock(IStorageController.class));
      vm.saveSettings();

      replay(vm);

      new AddIDEControllerIfNotExists(storageController).apply(vm);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

   public void testSetRAMSizeSuccessful() throws Exception {
      long memorySize = 1024l;
      IMachine machine = createMock(IMachine.class);

      machine.setMemorySize(memorySize);
      machine.saveSettings();

      replay(machine);

      new ApplyMemoryToMachine(memorySize).apply(machine);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      IMachine machine = createMock(IMachine.class);

      VBoxException invalidRamSizeException = new VBoxException(createNiceMock(Throwable.class), error);
      machine.setMemorySize(memorySize);
      expectLastCall().andThrow(invalidRamSizeException);
      machine.saveSettings();

      replay(machine);

      new ApplyMemoryToMachine(memorySize).apply(machine);
   }
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      expect(vBox.findMachine(vmName)).andReturn(createdMachine).anyTimes();
      expect(manager.getSessionObject()).andReturn(session);
      expect(session.getMachine()).andReturn(createdMachine);
      createdMachine.lockMachine(session, LockType.Write);
      createdMachine.setMemorySize(1024l);
      createdMachine.saveSettings();
      session.unlockMachine();

      // TODO: this mock test is not finished.
      replay(manager, createdMachine, vBox, session);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

    expect(machine.getNetworkAdapter(adapterId)).andReturn(iNetworkAdapter);
    iNetworkAdapter.setAttachmentType(Bridged);
    iNetworkAdapter.setMACAddress(macAddress);
    iNetworkAdapter.setBridgedInterface(hostInterface);
    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.Bridged).build();
    NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      IMachine machine = createMock(IMachine.class);

      int controllerPort = 0;
      int device = 1;

      machine.saveSettings();
      machine.detachDevice(controller, controllerPort, device);

      replay(machine);

      new DetachDistroMediumFromMachine(controller, controllerPort, device).apply(machine);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      expect(vBox.findMachine(oldMachineName)).andReturn(oldMachine);
      expect(manager.getSessionObject()).andReturn(detachSession);
      oldMachine.lockMachine(detachSession, LockType.Write);
      expect(detachSession.getMachine()).andReturn(oldMachine);
      oldMachine.detachDevice(oldAttachmentController, oldAttachmentPort, oldAttachmentDevice);
      oldMachine.saveSettings();

      expect(medium.deleteStorage()).andReturn(progress);
      expect(vBox.createHardDisk(diskFormat, adminDiskPath)).andReturn(newHardDisk);
      expect(newHardDisk.createBaseStorage(anyLong(), anyLong())).andReturn(progress);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.saveSettings()

      Map<Long, DeviceType> positionAndDeviceType = ImmutableMap.of(1l, DeviceType.HardDisk);
      IMachine machine = createMock(IMachine.class);
      for(long position : positionAndDeviceType.keySet()) {
         machine.setBootOrder(position, positionAndDeviceType.get(position));
      }
      machine.saveSettings();
      replay(machine);
      new ApplyBootOrderToMachine(positionAndDeviceType).apply(machine);
      verify(machine);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.