VBoxWrapper.VBox configureVBoxWrapper() { VBoxWrapper.VBox vbox = new VBoxWrapper.VBox(); VBoxWrapper.MachineBuilder machineBuilder = new WrapperExtensions.ServiceMachineBuilder(); machineBuilder.MachineListBuilder = new VBoxWrapper.COMInterface.ComMachineProxyListBuilder(); vbox.MachineBuilder = machineBuilder; return vbox; }
VBoxWrapper.VBox configureVBoxWrapper() { VBoxWrapper.VBox vbox = new VBoxWrapper.VBox(); VBoxWrapper.MachineBuilder machineBuilder = new WrapperExtensions.ServiceMachineBuilder(); machineBuilder.MachineListBuilder = new VBoxWrapper.COMInterface.ComMachineProxyListBuilder(); vbox.MachineBuilder = machineBuilder; return(vbox); }
public void buildMachineTest() { _mockMachineProxy.Setup(x => x.Start()).Returns(new Mock<ProgressToken>().Object).Verifiable(); ServiceMachineBuilder smb = new ServiceMachineBuilder(); smb.MachineListBuilder = _mockMachineProxyListBuilder.Object; Machine m = smb.buildMachine(_mockMachineProxy.Object); ProgressToken t = m.StartAsync(); _mockMachineProxy.VerifyAll(); Assert.IsInstanceOfType(((ServiceAwareMachine)m).ServiceInfoProvider, typeof(DescriptionBasedInfoProvider)); }