protected void CreateContext()
 {
     xenStore = MockRepository.GenerateMock<IXenStore>();
     commandFactory = MockRepository.GenerateMock<ICommandFactory>();
     executableCommand = MockRepository.GenerateMock<IExecutableCommand>();
     logger = MockRepository.GenerateMock<ILogger>();
     commandQueue = new CommandQueue(xenStore, commandFactory, logger);
 }
 protected void CreateContext()
 {
     xenStore          = MockRepository.GenerateMock <IXenStore>();
     commandFactory    = MockRepository.GenerateMock <ICommandFactory>();
     executableCommand = MockRepository.GenerateMock <IExecutableCommand>();
     logger            = MockRepository.GenerateMock <ILogger>();
     commandQueue      = new CommandQueue(xenStore, commandFactory, logger);
 }
        public ResetNetwork(ISetNetworkInterface setNetworkInterface, IXenNetworkInformation xenNetworkInformation, ISetNetworkRoutes setNetworkRoutes, 
            ISetProviderData setProviderData, IXenProviderDataInformation xenProviderDataInformation, ISetHostnameAction setHostname, IXenStore xenStore)
        {
            _setNetworkInterface = setNetworkInterface;
            _xenNetworkInformation = xenNetworkInformation;
            _setNetworkRoutes = setNetworkRoutes;

            _setProviderData = setProviderData;
            _xenProviderDataInformation = xenProviderDataInformation;
            _setHostname = setHostname;
            _xenStore = xenStore;
        }
        public ResetNetwork(ISetNetworkInterface setNetworkInterface, IXenNetworkInformation xenNetworkInformation, ISetNetworkRoutes setNetworkRoutes,
                            ISetProviderData setProviderData, IXenProviderDataInformation xenProviderDataInformation, ISetHostnameAction setHostname, IXenStore xenStore)
        {
            _setNetworkInterface   = setNetworkInterface;
            _xenNetworkInformation = xenNetworkInformation;
            _setNetworkRoutes      = setNetworkRoutes;

            _setProviderData            = setProviderData;
            _xenProviderDataInformation = xenProviderDataInformation;
            _setHostname = setHostname;
            _xenStore    = xenStore;
        }
        public void Setup()
        {
            xenNetworkInformation = MockRepository.GenerateMock<IXenNetworkInformation>();
            setNetworkInterface = MockRepository.GenerateMock<ISetNetworkInterface>();
            setNetworkRoutes = MockRepository.GenerateMock<ISetNetworkRoutes>();

            xenProviderDataInformation = MockRepository.GenerateMock<IXenProviderDataInformation>();
            setProviderData = MockRepository.GenerateMock<ISetProviderData>();
            setHostname = MockRepository.GenerateMock<ISetHostnameAction>();
            _xenStore = MockRepository.GenerateMock<IXenStore>();

            networkInterface = new NetworkInterface();
            network = new Network();
            network.Interfaces.Add("fakemac", networkInterface);

            providerData = new ProviderData();

            command = new ResetNetwork(setNetworkInterface, xenNetworkInformation, setNetworkRoutes, setProviderData, xenProviderDataInformation, setHostname, _xenStore);
        }
Пример #6
0
        public void Setup()
        {
            xenNetworkInformation = MockRepository.GenerateMock <IXenNetworkInformation>();
            setNetworkInterface   = MockRepository.GenerateMock <ISetNetworkInterface>();
            setNetworkRoutes      = MockRepository.GenerateMock <ISetNetworkRoutes>();

            xenProviderDataInformation = MockRepository.GenerateMock <IXenProviderDataInformation>();
            setProviderData            = MockRepository.GenerateMock <ISetProviderData>();
            setHostname = MockRepository.GenerateMock <ISetHostnameAction>();
            _xenStore   = MockRepository.GenerateMock <IXenStore>();


            networkInterface = new NetworkInterface();
            network          = new Network();
            network.Interfaces.Add("fakemac", networkInterface);

            providerData = new ProviderData();

            command = new ResetNetwork(setNetworkInterface, xenNetworkInformation, setNetworkRoutes, setProviderData, xenProviderDataInformation, setHostname, _xenStore);
        }
 public XenUserMetadata(IXenStore xenstore)
 {
     _xenStore = xenstore;
 }
 public CommandQueue(IXenStore store, ICommandFactory factory, ILogger logger)
 {
     _store = store;
     _factory = factory;
     _logger = logger;
 }
 public XenProviderDataInformation(IXenStore xenstore)
 {
     _xenStore = xenstore;
 }
 public XenNetworkInformation(IXenStore xenstore)
 {
     _xenStore = xenstore;
 }
Пример #11
0
 public void Setup()
 {
     executable = MockRepository.GenerateMock <IExecutableProcess>();
     xenStore   = new XenStore(executable);
 }
 public XenNetworkInformation(IXenStore xenstore)
 {
     _xenStore = xenstore;
 }
 public XenProviderDataInformation(IXenStore xenstore)
 {
     _xenStore = xenstore;
 }
 public CommandQueue(IXenStore store, ICommandFactory factory, ILogger logger)
 {
     _store   = store;
     _factory = factory;
     _logger  = logger;
 }
 public void Setup()
 {
     executable = MockRepository.GenerateMock<IExecutableProcess>();
     xenStore = new XenStore(executable);
 }
 public XenUserMetadata(IXenStore xenstore)
 {
     _xenStore = xenstore;
 }