Ejemplo n.º 1
0
        public void StartBlock()
        {
            StartManager();

            MachineProfile machine = NetworkProfile.GetMachineProfile(LocalAddress);

            Assert.IsNotNull(machine);
            Assert.IsFalse(machine.IsBlock);
            NetworkProfile.StartService(LocalAddress, ServiceType.Block);
            NetworkProfile.RegisterBlock(LocalAddress);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }