void SelectOperationCore (MySelector d)
		{
			string name;
			var msg = Message.CreateMessage (MessageVersion.Soap12, "http://temuri.org/MyService/Echo"); // looks like Version is not checked
			Assert.IsNull (msg.Headers.To, "#1-0");
			Assert.IsFalse (d.SelectOperation (ref msg, out name), "#1");
			Assert.AreEqual ("", name, "#1-2");
			Assert.IsNull (msg.Headers.To, "#1-3"); // no overwrite
			Assert.IsFalse (msg.Properties.ContainsKey ("UriMatched"), "#1-4");

			msg = Message.CreateMessage (MessageVersion.None, "http://temuri.org/MyService/Echo");
			Assert.IsFalse (d.SelectOperation (ref msg, out name), "#2");
			Assert.IsFalse (msg.Properties.ContainsKey ("UriMatched"), "#2-2");

			msg = Message.CreateMessage (MessageVersion.None, "http://foobar.org/MyService/NonExistent");
			Assert.IsFalse (d.SelectOperation (ref msg, out name), "#3");
			Assert.AreEqual ("", name, "#3-2");
			Assert.IsFalse (msg.Properties.ContainsKey ("UriMatched"), "#3-3");

			// version and action do not matter
			msg = Message.CreateMessage (MessageVersion.Soap12, "http://nonexistent.org/");
			var http = new HttpRequestMessageProperty ();
			// this mismatch is allowed. Lack of this value is OK.
//			http.Method = "POST";
			// this mismatch is allowed. Lack of this value is OK.
//			http.QueryString = "foo=bar";
			// this mismatch is allowed. Lack of this value is OK.
//			http.Headers.Add ("Content-Type", "application/json");
			// so, the http property can be empty, but is required.
			msg.Properties.Add (HttpRequestMessageProperty.Name, http);
			msg.Headers.To = new Uri ("http://localhost:8080/Echo?input=hoge");
			Assert.IsTrue (d.SelectOperation (ref msg, out name), "#4");
			// FIXME: hmm... isn'y "Echo" expected?
			// Assert.AreEqual ("", name, "#4-2");
		}
Example #2
0
    // Use this for initialization
    void Start()
    {
        //selektor1 = new MySelector(verhalten1);
        parallel1  = new MyParallelTask(verhalten1);
        untilfail1 = new MyUntilFail(parallel1);
        selector1  = new MySelector(untilfail1);
        sequence1  = new MySequence(selector1);

        collectTrash1 = new CollectTrash(collector.GetComponent <Rigidbody>(), collector.GetComponent <Transform>(), verhalten1, parallel1);

        seek2 = new Seek(dropper.GetComponent <Rigidbody>(), dropper.GetComponent <Transform>(), ladeStation.GetComponent <Transform>(), verhalten1, selector1);
        drop1 = new Drop(dropper.GetComponent <Rigidbody>(), dropper.GetComponent <Transform>(), trash, verhalten1, sequence1);
        //wander1 = new Wander(target.GetComponent<Rigidbody>(),target.GetComponent<Transform>(), verhalten1, sequence1);
        seek1         = new Seek(seeker.GetComponent <Rigidbody>(), seeker.GetComponent <Transform>(), dropper.GetComponent <Transform>(), verhalten1, sequence1);
        saveWanderer1 = new SaveWanderer(seeker.GetComponent <Rigidbody>(), seeker.GetComponent <Transform>(), dropper.GetComponent <Rigidbody>(), dropper.GetComponent <Transform>(), new Vector3(0, 0.6f, 0), verhalten1, sequence1);

        verhalten1.startZwei();
    }
Example #3
0
        void SelectOperationCore(MySelector d)
        {
            string name;
            var    msg = Message.CreateMessage(MessageVersion.Soap12, "http://temuri.org/MyService/Echo");           // looks like Version is not checked

            Assert.IsNull(msg.Headers.To, "#1-0");
            Assert.IsFalse(d.SelectOperation(ref msg, out name), "#1");
            Assert.AreEqual("", name, "#1-2");
            Assert.IsNull(msg.Headers.To, "#1-3");              // no overwrite
            Assert.IsFalse(msg.Properties.ContainsKey("UriMatched"), "#1-4");

            msg = Message.CreateMessage(MessageVersion.None, "http://temuri.org/MyService/Echo");
            Assert.IsFalse(d.SelectOperation(ref msg, out name), "#2");
            Assert.IsFalse(msg.Properties.ContainsKey("UriMatched"), "#2-2");

            msg = Message.CreateMessage(MessageVersion.None, "http://foobar.org/MyService/NonExistent");
            Assert.IsFalse(d.SelectOperation(ref msg, out name), "#3");
            Assert.AreEqual("", name, "#3-2");
            Assert.IsFalse(msg.Properties.ContainsKey("UriMatched"), "#3-3");

            // version and action do not matter
            msg = Message.CreateMessage(MessageVersion.Soap12, "http://nonexistent.org/");
            var http = new HttpRequestMessageProperty();

            // this mismatch is allowed. Lack of this value is OK.
//			http.Method = "POST";
            // this mismatch is allowed. Lack of this value is OK.
//			http.QueryString = "foo=bar";
            // this mismatch is allowed. Lack of this value is OK.
//			http.Headers.Add ("Content-Type", "application/json");
            // so, the http property can be empty, but is required.
            msg.Properties.Add(HttpRequestMessageProperty.Name, http);
            msg.Headers.To = new Uri("http://localhost:8080/Echo?input=hoge");
            Assert.IsTrue(d.SelectOperation(ref msg, out name), "#4");
            // FIXME: hmm... isn'y "Echo" expected?
            // Assert.AreEqual ("", name, "#4-2");
        }