public void TestConstructorLocalJobProxy() { GlobusJobProxy jobProxy = new GlobusJobProxy(); Assert.IsNotNull(jobProxy, "Constructor of type, LocalJobProxy failed to create instance."); Assert.AreEqual("Globus", jobProxy.Name, "Name is unexpected value."); Assert.AreEqual(4, jobProxy.Concurrency, "DefaultConcurrency is unexpected value."); jobProxy.Concurrency = 100; Assert.AreEqual(100, jobProxy.Concurrency, "DefaultConcurrency is unexpected value."); Assert.IsNull(jobProxy.Manager, "Manager is unexpected value."); jobProxy.Manager = (JobManager)_env.JobManager; Assert.AreEqual(_env.JobManager, jobProxy.Manager, "Manager is unexpected value."); }
/// <summary> /// Constructor. /// </summary> public JobManager(ApplicationEnvironment env) { m_env = env; m_timer = new Timer(); m_timer.Enabled = false; m_timer.Interval = m_updateInterval; m_timer.Tick += new EventHandler(UpdateTimeFire); LocalJobProxy p = new LocalJobProxy(); p.Manager = this; m_proxyList.Add(p.Name, p); string cog_home = System.Environment.GetEnvironmentVariable("COG_HOME"); if (!string.IsNullOrEmpty(cog_home)) { GlobusJobProxy g = new GlobusJobProxy(); g.Manager = this; m_proxyList.Add(g.Name, g); } SetCurrentEnvironment(p.Name); TmpRootDir = Util.GetTmpDir(); }
public void TearDown() { _unitUnderTest = null; }
public void SetUp() { _env = new ApplicationEnvironment(); _unitUnderTest = new GlobusJobProxy(); _unitUnderTest.Manager = (JobManager)_env.JobManager; }