public void Execute1WayStepTest()
        {
            SubmitMockMessage1WayStep target = new SubmitMockMessage1WayStep("Mock submission test"); // TODO: Initialize to an appropriate value

            target.DestURI                = "http://*****:*****@"BizWTF.Testing.Sample.Messages.Mock-Demo-Enveloppe.xml";
            target.SourceResourceAssembly = System.Reflection.Assembly.GetExecutingAssembly().FullName;

            bool expected = true;
            bool actual   = target.ExecuteStep();

            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Beispiel #2
0
        public void Call1WayMock()
        {
            using (Init1WayMockMessagingService oneWayTarget = new Init1WayMockMessagingService
            {
                StepName = "Init 1-Way mock service",
                ServiceURI = "http://*****:*****@"BizWTF.Testing.Sample.Messages.Mock-Demo-1WayMockService.xml";
                send1WayMsgStep.SourceResourceAssembly = System.Reflection.Assembly.GetExecutingAssembly().FullName; // In this case, the resource is embedded in the current assembly
                send1WayMsgStep.TestID = send1WayMsgStep.TestID;                                                     // NOTE : you can provide a test ID, wich will be attached as a message property. This facilitates instance tracking.



                /// NOTE : the folowwing code actually sends the message.
                /// Nevertheless, it is recommended to first initialize all the steps of the test before executing any of them.
                if (!send1WayMsgStep.ExecuteStep())
                {
                    Assert.Fail(send1WayMsgStep.ResultDescription);
                }


                int iterationCount = 0;
                while (!msgReceived)
                {
                    iterationCount++;
                    System.Threading.Thread.Sleep(1000);
                    if (iterationCount == 1000)
                    {
                        Assert.Fail("No message was received");
                        break;
                    }
                }
            }
        }