public ResetNetwork(ISetNetworkInterface setNetworkInterface, IXenNetworkInformation xenNetworkInformation, ISetNetworkRoutes setNetworkRoutes,
            ISetProviderData setProviderData, IXenProviderDataInformation xenProviderDataInformation)
        {
            _setNetworkInterface = setNetworkInterface;
            _xenNetworkInformation = xenNetworkInformation;
            _setNetworkRoutes = setNetworkRoutes;

            _setProviderData = setProviderData;
            _xenProviderDataInformation = xenProviderDataInformation;
        }
        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;
        }
コード例 #3
0
        public ResetNetwork(ISetNetworkInterface setNetworkInterface, IXenNetworkInformation xenNetworkInformation, ISetNetworkRoutes setNetworkRoutes,
                            ISetProviderData setProviderData, IXenProviderDataInformation xenProviderDataInformation, ISetHostnameAction setHostname, IXenStore xenStore, IXenUserMetadata xenUserMetadata)
        {
            _setNetworkInterface   = setNetworkInterface;
            _xenNetworkInformation = xenNetworkInformation;
            _setNetworkRoutes      = setNetworkRoutes;

            _setProviderData            = setProviderData;
            _xenProviderDataInformation = xenProviderDataInformation;
            _setHostname     = setHostname;
            _xenStore        = xenStore;
            _xenUserMetadata = xenUserMetadata;
        }
        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);
        }
コード例 #5
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 void Setup()
        {
            xenNetworkInformation = MockRepository.GenerateMock<IXenNetworkInformation>();
            setNetworkInterface = MockRepository.GenerateMock<ISetNetworkInterface>();
            setNetworkRoutes = MockRepository.GenerateMock<ISetNetworkRoutes>();

            xenProviderDataInformation = MockRepository.GenerateMock<IXenProviderDataInformation>();
            setProviderData = MockRepository.GenerateMock<ISetProviderData>();

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

            providerData = new ProviderData();

            command = new ResetNetwork(setNetworkInterface, xenNetworkInformation, setNetworkRoutes, setProviderData, xenProviderDataInformation);
            xenNetworkInformation.Stub(x => x.Get()).Return(network);
            xenProviderDataInformation.Stub(x => x.Get()).Return(providerData);

            result = command.Execute(null);
        }
コード例 #7
0
        public void Setup()
        {
            xenNetworkInformation = MockRepository.GenerateMock <IXenNetworkInformation>();
            setNetworkInterface   = MockRepository.GenerateMock <ISetNetworkInterface>();
            setNetworkRoutes      = MockRepository.GenerateMock <ISetNetworkRoutes>();

            xenProviderDataInformation = MockRepository.GenerateMock <IXenProviderDataInformation>();
            setProviderData            = MockRepository.GenerateMock <ISetProviderData>();


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

            providerData = new ProviderData();

            command = new ResetNetwork(setNetworkInterface, xenNetworkInformation, setNetworkRoutes, setProviderData, xenProviderDataInformation);
            xenNetworkInformation.Stub(x => x.Get()).Return(network);
            xenProviderDataInformation.Stub(x => x.Get()).Return(providerData);

            result = command.Execute(null);
        }