public void ProcessTaskTest_InputTaskRecord_IsTaskLocked()
 {
     IET.Inspec.Fairburn.AgentTemplate.Task x = new IET.Inspec.Fairburn.AgentTemplate.Task();
     var privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(x);
     x.Initialise(new Host(), 0);
     TaskResponse resp = new TaskResponse();
     privateObject.SetField("_Task", resp);
     privateObject.Invoke("ProcessTask");
 }
        public void ProcessTaskTest_InputTaskRecord_IsTaskLocked()
        {
            IET.Inspec.Fairburn.AgentTemplate.Task x = new IET.Inspec.Fairburn.AgentTemplate.Task();
            var privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(x);

            x.Initialise(new Host(), 0);
            TaskResponse resp = new TaskResponse();

            privateObject.SetField("_Task", resp);
            privateObject.Invoke("ProcessTask");
        }
 public void GetTaskTest_InputTestMode1_ExpectTaskRecord()
 {
     WcfSelfHost host = new WcfSelfHost(typeof(Service));
     IET.Inspec.Fairburn.AgentTemplate.Task x = new IET.Inspec.Fairburn.AgentTemplate.Task();
     var privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(x);
     x.Initialise(new Host(), 0);
     privateObject.SetField("_TestMode", 1);
     bool ok = Convert.ToBoolean(privateObject.Invoke("GetTask"));
     Assert.IsFalse(ok);
     host.Dispose();
     host = null;
 }
 public void PostResultsTests_InputTestMode1_OutputSuccess()
 {
     WcfSelfHost host = new WcfSelfHost(typeof(Service));
     IET.Inspec.Fairburn.AgentTemplate.Task x = new IET.Inspec.Fairburn.AgentTemplate.Task();
     var privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(x);
     x.Initialise(new Host(), 0);
     PostResultsRequest req = new PostResultsRequest();
     req.TestMode = 1;
     privateObject.SetField("_Results", req);
     privateObject.Invoke("PostResults");
     //privateObject.Invoke("APrivateMethod", new object[] { param1, param2}); -- Call Private method with parameters
     host.Dispose();
     host = null;
 }
        public void GetTaskTest_InputTestMode1_ExpectTaskRecord()
        {
            WcfSelfHost host = new WcfSelfHost(typeof(Service));

            IET.Inspec.Fairburn.AgentTemplate.Task x = new IET.Inspec.Fairburn.AgentTemplate.Task();
            var privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(x);

            x.Initialise(new Host(), 0);
            privateObject.SetField("_TestMode", 1);
            bool ok = Convert.ToBoolean(privateObject.Invoke("GetTask"));

            Assert.IsFalse(ok);
            host.Dispose();
            host = null;
        }
        public void PostResultsTests_InputTestMode1_OutputSuccess()
        {
            WcfSelfHost host = new WcfSelfHost(typeof(Service));

            IET.Inspec.Fairburn.AgentTemplate.Task x = new IET.Inspec.Fairburn.AgentTemplate.Task();
            var privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(x);

            x.Initialise(new Host(), 0);
            PostResultsRequest req = new PostResultsRequest();

            req.TestMode = 1;
            privateObject.SetField("_Results", req);
            privateObject.Invoke("PostResults");
            //privateObject.Invoke("APrivateMethod", new object[] { param1, param2}); -- Call Private method with parameters
            host.Dispose();
            host = null;
        }