public void should_set_interface_from_interfaceconfigiuration()
        {
            xenNetworkInformation.Stub(x => x.Get()).Return(network);
            xenUserMetadata.Stub(x => x.GetKeys()).Return(userMetadata);
            xenProviderDataInformation.Stub(x => x.Get()).Return(providerData);
            _xenStore.Stub(x => x.ReadVmData("hostname")).Return(hostname);
            _xenStore.Stub(x => x.Read("vm-data")).Return(vmKeys);
            _xenStore.Stub(x => x.Read("vm-data/user-metadata")).Return(metadata);

            result = command.Execute(null);

            setNetworkInterface.AssertWasCalled(x => x.Execute(new List <NetworkInterface> {
                networkInterface
            }));
            setNetworkRoutes.AssertWasCalled(x => x.Execute(network));
            setProviderData.AssertWasCalled(x => x.Execute(providerData, userMetadata));
            setHostname.AssertWasCalled(x => x.SetHostname(hostname));
        }
 internal void Setup(string[] interfaces)
 {
     _store.Stub(st => st.Read(_baseconfig)).Return(interfaces);
 }
 protected void XenSetup(params Command[] xendata)
 {
     xenStore.Stub(x => x.GetCommands()).Return(xendata);
 }