Disconnect() public method

public Disconnect ( ) : void
return void
		public void TestConnect()
		{
			var env = new DummyControllerEnvironment();
			var ctl = new Controller(new DummyTimeTrackingRepository(), new DummyWebServicesFactory(), env);
			Assert.IsFalse(ctl.Connected);
			ctl.Disconnect();
		}
		public void TestConnectDisconnect()
		{
			var settings = new Settings {Uri = new Uri("http://localhost"), Login = "******", DecryptedPassword = "******",};
			settings.Save();
			var env = new DummyControllerEnvironment();
			Controller ctl;
			using (ctl = new Controller(new DummyTimeTrackingRepository(), new DummyWebServicesFactory(), env))
			{
				Assert.IsFalse(ctl.Connected);
				env.DialogResult = DialogResult.OK;
				ctl.Connect(true);
				Assert.IsTrue(ctl.Connected);
				ctl.Disconnect();
				Assert.IsFalse(ctl.Connected);
				env.DialogResult = DialogResult.Cancel;
				ctl.Connect(true);
				Assert.IsFalse(ctl.Connected);
				env.DialogResult = DialogResult.OK;
				ctl.Connect(true);
				Assert.IsTrue(ctl.Connected);
			}
			Assert.IsFalse(ctl.Connected);
		}