public void RockFactoryReceivesAndProcessesSingleRockItemIssuingNotificationOnCompletion()
        {
            var rockFactory = new RockFactory();

            rockFactory.RegisterMonitor(this);
            const double weight = 3;

            Console.WriteLine("Sending {0} item of weight {1} for processing", RockType.Granit, weight);
            Guid jobId = rockFactory.ProcessRock(RockType.Granit, weight);

            Console.WriteLine("Waiting for notifications.");
            WaitForNotfication();
            Console.WriteLine("Notifications received.");

            Console.WriteLine("Test complete");
        }
        public void ContianerIdAvailableAfterCompletionNotificationReceived()
        {
            var rockFactory = new RockFactory();

            rockFactory.RegisterMonitor(this);
            const double weight = 5.6;

            Console.WriteLine("Sending {0} item of weight {1} for processing", RockType.Granit, weight);
            Guid jobId = rockFactory.ProcessRock(RockType.Granit, weight);

            Console.WriteLine("Waiting for notifications.");
            WaitForNotfication();
            Console.WriteLine("Notifications received.");

            var containerId = rockFactory.PackageManager.GetContainerIdForJob(jobId);

            Assert.IsTrue(containerId != Guid.Empty, "Failed to retrieve contianer Id from Package Manager");
            Console.WriteLine("Test complete");
        }
        public void ProcessInformationAvailableAfterNotificationCompletionReceived()
        {
            var rockFactory = new RockFactory();

            rockFactory.RegisterMonitor(this);
            const double weight = 5.6;

            Console.WriteLine("Sending {0} item of weight {1} for processing", RockType.Granit, weight);
            Guid jobId = rockFactory.ProcessRock(RockType.Granit, weight);

            Console.WriteLine("Waiting for notifications.");
            WaitForNotfication();
            Console.WriteLine("Notifications received.");

            var rockjob = rockFactory.GetProcessJob(jobId);

            Assert.IsNotNull(rockjob, "Failed to retrieve Job object from factory");
            Assert.AreEqual(jobId, rockjob.JobId);
            Console.WriteLine("Test complete");
        }