public void StartBlock() { StartManager(); MachineProfile machine = NetworkProfile.GetMachineProfile(LocalAddress); Assert.IsNotNull(machine); Assert.IsFalse(machine.IsBlock); NetworkProfile.StartService(LocalAddress, ServiceType.Block); NetworkProfile.RegisterBlock(LocalAddress); }
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); }
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); }