Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("\n\n-------------------------------------------------------------------------------");
                Console.WriteLine("\n   Requirement 1  is fulfilled and can be verified by checking source code");
                Console.WriteLine("\n-------------------------------------------------------------------------------");
                Console.WriteLine("\n   Requirement 2  \n   I have total 14 packages in my project which includes packages for\n   Executive, Mock Client, Mock Repository, Mock TestHarness and Core Builder.");
                ReqHandler rh = new ReqHandler();
                Client     dc = new Client(rh);
                Builder    br = new Builder(rh);
                Repository dr = new Repository(rh);
                LoadingTests.TestHarness th = new LoadingTests.TestHarness(rh);

                rh.testBuild  = br;
                rh.testRepo   = dr;
                rh.testTH     = th;
                rh.testClient = dc;
                Console.WriteLine("\n-------------------------------------------------------------------------------");
                Console.WriteLine("\n   Requirement 3  \n   Showing Builder Operations by fixed sequence of operations.\n");
                Console.WriteLine("\n   1. Client creates test request and command repository by sending message to process testrequest.");
                //Client creates build message
                Message msg = dc.CreateBuildMessage("c#");
                dc.send(msg);
                Console.WriteLine("\n  6. Builder sends message to TestHarness to proceed with testing.\n");
                //Core Builder sends test message to test harness
                msg = br.CreateTestMessage();
                br.send(msg);
                Console.WriteLine("\n----------------------------------------------------------------------------------------------");
                Console.WriteLine("\nJava Implementation");
                msg = dc.CreateBuildMessage("java");
                dc.send(msg);
                Console.WriteLine("\n Sending jar file to test harness");
                th.sendJar();
                Console.WriteLine("\n----------------------------------------------------------------------------------------------");
                Console.WriteLine("\n  Client sending request for viewing logs specifying name of author and type of log(Build/Test)\n");
                //View log
                msg = dc.CreateViewLogMessage();
                dc.send(msg);
                msg = dc.CreateViewLogMessageLogNotFound();
                dc.send(msg);
            }
            catch (Exception ex)
            {
                Console.Write("\n\n  {0}", ex.Message);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            ReqHandler rh = new ReqHandler();
            Client     dc = new Client(rh);
            Builder    br = new Builder(rh);
            Repository dr = new Repository(rh);

            LoadingTests.TestHarness th = new LoadingTests.TestHarness(rh);

            rh.testBuild  = br;
            rh.testRepo   = dr;
            rh.testTH     = th;
            rh.testClient = dc;
            Message msg = dc.CreateBuildMessage();

            dc.send(msg);
        }