Exemple #1
0
        public void StartAndStopRoot()
        {
            StartRoot();

            MachineProfile machine = NetworkProfile.GetMachineProfile(LocalAddress);

            Assert.IsNotNull(machine);
            Assert.IsTrue(machine.IsRoot);

            NetworkProfile.StopService(LocalAddress, ServiceType.Root);
            NetworkProfile.Refresh();

            machine = NetworkProfile.GetMachineProfile(LocalAddress);
            Assert.IsNotNull(machine);
            Assert.IsFalse(machine.IsRoot);
        }
Exemple #2
0
        public void StartManager()
        {
            MachineProfile machine = NetworkProfile.GetMachineProfile(LocalAddress);

            Assert.IsNotNull(machine);
            Assert.IsEmpty(NetworkProfile.GetManagerServers());
            Assert.IsFalse(machine.IsManager);
            NetworkProfile.StartService(LocalAddress, ServiceType.Manager);
            NetworkProfile.RegisterManager(LocalAddress);

            NetworkProfile.Refresh();

            machine = NetworkProfile.GetMachineProfile(LocalAddress);
            Assert.IsNotNull(machine);
            Assert.IsNotNull(NetworkProfile.GetManagerServers());
            Assert.IsTrue(machine.IsManager);
        }
Exemple #3
0
        public void StartAllServices()
        {
            StartManager();

            NetworkProfile.Refresh();

            MachineProfile machine = NetworkProfile.GetMachineProfile(LocalAddress);

            Assert.IsNotNull(machine);
            Assert.IsFalse(machine.IsRoot);
            NetworkProfile.StartService(LocalAddress, ServiceType.Root);
            NetworkProfile.RegisterRoot(LocalAddress);

            NetworkProfile.Refresh();

            machine = NetworkProfile.GetMachineProfile(LocalAddress);
            Assert.IsNotNull(machine);
            Assert.IsFalse(machine.IsBlock);
            NetworkProfile.StartService(LocalAddress, ServiceType.Block);
            NetworkProfile.RegisterBlock(LocalAddress);
        }