public void ThrowIfDisposedOrImmutable_Fault_Abort ()
		{
			bool opening = false;
			bool opened = false;
			bool closing = false;
			bool closed = false;
			bool faulted = false;

			CommunicationObjectPoker co = new CommunicationObjectPoker ();

			co.Opening += delegate (object sender, EventArgs e) {
				opening = true;
				Assert.AreEqual (CommunicationState.Opening, co.State, "Opening/State");
				Assert.Throws<ObjectDisposedException> (delegate {
					co._ThrowIfDisposedOrImmutable ();
				}, "ThrowIfDisposedOrImmutable/Opening");
			};
			co.Opened += delegate (object sender, EventArgs e) {
				opened = true;
				Assert.AreEqual (CommunicationState.Opened, co.State, "Opened/State");
				Assert.Throws<ObjectDisposedException> (delegate {
					co._ThrowIfDisposedOrImmutable ();
				}, "ThrowIfDisposedOrImmutable/Opened");
			};
			co.Closing += delegate (object sender, EventArgs e) {
				closing = true;
				Assert.AreEqual (CommunicationState.Closing, co.State, "Closing/State");
				Assert.Throws<CommunicationObjectAbortedException> (delegate {
					co._ThrowIfDisposedOrImmutable ();
				}, "ThrowIfDisposedOrImmutable/Closing");
			};
			co.Closed += delegate (object sender, EventArgs e) {
				closed = true;
				Assert.AreEqual (CommunicationState.Closed, co.State, "Closed/State");
				Assert.Throws<CommunicationObjectAbortedException> (delegate {
					co._ThrowIfDisposedOrImmutable ();
				}, "ThrowIfDisposedOrImmutable/Closed");
			};
			co.Faulted += delegate (object sender, EventArgs e) {
				faulted = true;
				Assert.AreEqual (CommunicationState.Faulted, co.State, "Faulted/State");
				Assert.Throws<CommunicationObjectFaultedException> (delegate {
					co._ThrowIfDisposedOrImmutable ();
				}, "ThrowIfDisposedOrImmutable/Faulted");
			};

			Assert.AreEqual (CommunicationState.Created, co.State, "Created");
			co._ThrowIfDisposedOrImmutable ();

			co._FaultNoAssert ();

			co.OnAbortState = CommunicationState.Closing;
			co.Abort ();

			// ensure all states were tested
			Assert.IsFalse (opening, "opening");
			Assert.IsFalse (opened, "opened");
			Assert.IsTrue (closing, "closing");
			Assert.IsTrue (closed, "closing");
			Assert.IsTrue (faulted, "faulted");
		}
		public void Create_Close_Fault ()
		{
			bool faulted = false;

			CommunicationObjectPoker co = new CommunicationObjectPoker ();
			co.Faulted += delegate (object sender, EventArgs e) {
				faulted = true; // won't be hit
			};
			co.Open ();
			co.Close (); // real Close, not an implicit Abort since Open was called
			co._FaultNoAssert (); // don't check State since it won't be Faulted
			Assert.AreEqual (CommunicationState.Closed, co.State, "State/Fault");
			Assert.IsFalse (faulted, "Faulted");
		}