Beispiel #1
0
		public async void Subscribe()
		{
			var app = new KZApplication(Constants.marketplace, Constants.application);
			await app.Initialize();
			var user = await app.Authenticate (Constants.user, Constants.pass, Constants.provider);




			var channel = app.PubSubChannel ["pubsubchanneltest"];


			var rnd = Guid.NewGuid ().ToString ();


			channel.Susbscribe<ChannelMessage> (msg=> {
				Assert.Equals(rnd, msg.value);
				autoEvent.Set();
			}, err=>{
				if(err!=null) Assert.Fail();
			}) ;
		
			var message = new ChannelMessage { value = rnd};

			var response = channel.Publish (message);
			//Assert.AreEqual(HttpStatusCode.Created, response.Result.StatusCode);

			if (autoEvent.WaitOne (60000)) {
				Assert.True (1 == 1);
			} else {
				Assert.Fail();
			}
		}
Beispiel #2
0
		void onMessage (ChannelMessage obj)
		{
			throw new NotImplementedException ();
		}