public void StandardOrderShouldBeSavedInCorrectFolder()
        {
            var testCase = new TestCase { Name = "Test that standard order is saved in correct folder" };

            testCase.SetupSteps.Add(DeleteFilesStep());

            testCase.ExecutionSteps.Add(CreateFileStep());

            testCase.ExecutionSteps.Add(ValidateFileExits());

            var bizUnit = new BizUnit.BizUnit(testCase);
            bizUnit.RunTest();
        }
 public void IntegrationTest_With_Valid_Message_In()
 {
     TestCase testCase = new TestCase { Name = MethodBase.GetCurrentMethod().Name };
     MsmqPurgeStep msmqPurgeStep1 = new MsmqPurgeStep
         {
             FailOnError = true,
             Name = "Purge 'MessageIn'.",
             QueuePath = ".\\private$\\AcmeCorp.BizTalkBuildSample.MessageIn"
         };
     testCase.ExecutionSteps.Add(msmqPurgeStep1);
     MsmqPurgeStep msmqPurgeStep2 = new MsmqPurgeStep
         {
             FailOnError = true,
             Name = "Purge 'MessageOut'.",
             QueuePath = ".\\private$\\AcmeCorp.BizTalkBuildSample.MessageOut"
         };
     testCase.ExecutionSteps.Add(msmqPurgeStep2);
     XmlDocument messageBody = new XmlDocument();
     messageBody.LoadXml(@"<ns0:Root xmlns:ns0='http://schemas.AcmeCorp.com/BizTalkBuildSample/MessageIn'><ValueIn>ValueIn_0</ValueIn></ns0:Root>");
     MsmqWriteStep msmqWriteStep = new MsmqWriteStep
         {
             FailOnError = true,
             Name = "Write 'MessageIn' message to MSMQ.",
             QueuePath = ".\\private$\\AcmeCorp.BizTalkBuildSample.MessageIn",
             MessageBodyContent = messageBody
         };
     testCase.ExecutionSteps.Add(msmqWriteStep);
     XPathDefinition xpathDefinition = new XPathDefinition { Value = "ValueIn_0", XPath = "/*[local-name()='Root']/*[local-name()='ValueOut']" };
     XPathValidationStep xpathValidationStep = new XPathValidationStep();
     xpathValidationStep.XPathValidations.Add(xpathDefinition);
     MsmqReadStep msmqReadStep = new MsmqReadStep
         {
             FailOnError = true,
             Name = "Read 'MessageOut' message from MSMQ.",
             QueuePath = ".\\private$\\AcmeCorp.BizTalkBuildSample.MessageOut",
             TimeoutInMilliseconds = ThirtySecondsInMilliseconds
         };
     msmqReadStep.SubSteps = new Collection<SubStepBase>();
     msmqReadStep.SubSteps.Add(xpathValidationStep);
     testCase.ExecutionSteps.Add(msmqReadStep);
     BizUnit.BizUnit bizUnit = new BizUnit.BizUnit(testCase);
     bizUnit.RunTest();
 }
Esempio n. 3
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            sw = new System.IO.StringWriter();
            Console.SetOut(sw);

            string[] strFiles = txtTC.Text.Split(',');
            foreach (string str in strFiles)
            {
                BizUnit.BizUnit bizunit = new BizUnit.BizUnit(str);
                try
                {
                    Console.WriteLine("|||||||||||||||||||||||||||||||| Executing test case: " + str + " ||||||||||||||||||||||||||||||||");
                    bizunit.RunTest();
                    Console.WriteLine("||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\r\n\r\n");
                }
                catch (Exception exp)
                {
                    MessageBox.Show(exp.Message, "Test case failure", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }
Esempio n. 4
0
 public void TestCaseFixture()
 {
     // Execute the testcase
     BizUnit.BizUnit bizUnit = new BizUnit.BizUnit(@"..\..\TestCases\SampleTestCase.xml");
     bizUnit.RunTest();
 }
Esempio n. 5
0
 public void Setup()
 {
     // Setup the system for a new test, for example restart the BizTalk host or configure something
     BizUnit.BizUnit bizUnit = new BizUnit.BizUnit(@"..\..\TestCases\TestCaseGenericSetup.xml");
     bizUnit.RunTest();
 }