UnregisterBusObject() public method

public UnregisterBusObject ( BusObject obj ) : void
obj BusObject
return void
		public void TestObjectRegisteredUnregistered()
		{
			AllJoyn.QStatus status = AllJoyn.QStatus.FAIL;

			// create+start+connect bus attachment
			AllJoyn.BusAttachment bus = null;
			bus = new AllJoyn.BusAttachment("BusObjectTest", true);
			Assert.NotNull(bus);

			status = bus.Start();
			Assert.Equal(AllJoyn.QStatus.OK, status);

			status = bus.Connect(AllJoynTestCommon.GetConnectSpec());
			Assert.Equal(AllJoyn.QStatus.OK, status);

			// create the bus object
			TestBusObject testBusObject = new TestBusObject(bus, OBJECT_PATH, this);
			objectRegistered = false;
			objectUnregistered = false;

			// test registering the bus object
			status = bus.RegisterBusObject(testBusObject);
			Assert.Equal(AllJoyn.QStatus.OK, status);
			Wait(MaxWaitTime);
			Assert.Equal(true, objectRegistered);

			// test unregistering the bus object
			bus.UnregisterBusObject(testBusObject);
			Wait(MaxWaitTime);
			Assert.Equal(true, objectUnregistered);

			bus.Dispose();

		}