コード例 #1
0
        public void CollectionHoldsReferenceToJobs()
        {
            var collection = new SortingJobCollection();
            var job        = new SortingJob(new int[0]);

            collection.AddJob(job);
            var retrievedJob = collection.RetrieveJob(job.Id);

            Assert.IsTrue((object)job == (object)retrievedJob, "Collection is not properly storing jobs");
        }
コード例 #2
0
        public void AddAndRetrieveJob()
        {
            var collection = new SortingJobCollection();
            var job        = new SortingJob(new int[0]);

            collection.AddJob(job);
            var retrievedJob = collection.RetrieveJob(job.Id);

            Assert.IsNotNull(retrievedJob, "Retrieval was not successful");
        }