Inheritance: JobManagerService.JobManager
コード例 #1
0
        public void SetUp()
        {
            testStart = DateTime.Now;

            vmHash = new Dictionary <string, MockVMConnection>();
            List <string[]> mockVMs = new List <string[]>();

            mockVMs.Add(new string[] { "MockVMConfig1", "", "Snapshot1", "MockVMName1" });
            mockVMs.Add(new string[] { "MockVMConfig2", "", "Snapshot2", "MockVMName2" });
            sut = new JobManagerServiceWrapper();
            foreach (string[] mockInfo in mockVMs)
            {
                MockVMConnection vmConn = sut.MockVMHost.AddMockVM(mockInfo[3]);
                vmHash[vmConn._VMName] = vmConn;
                mockInfo[1]            = vmConn._Identifier;
            }
            using (TextWriter tw = new StreamWriter(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "vm_list.txt"), false))
            {
                foreach (string[] mockInfo in mockVMs)
                {
                    tw.WriteLine(string.Join(", ", mockInfo));
                }
            }
        }
コード例 #2
0
        public void SetUp()
        {
            testStart = DateTime.Now;

            vmHash = new Dictionary<string, MockVMConnection>();
            List<string[]> mockVMs = new List<string[]>();
            mockVMs.Add(new string[] { "MockVMConfig1", "", "Snapshot1", "MockVMName1" });
            mockVMs.Add(new string[] { "MockVMConfig2", "", "Snapshot2", "MockVMName2" });
            sut = new JobManagerServiceWrapper();
            foreach (string[] mockInfo in mockVMs)
            {
                MockVMConnection vmConn = sut.MockVMHost.AddMockVM(mockInfo[3]);
                vmHash[vmConn._VMName] = vmConn;
                mockInfo[1] = vmConn._Identifier;
            }
            using (TextWriter tw = new StreamWriter(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"vm_list.txt"),false))
            {
                foreach (string[] mockInfo in mockVMs)
                {
                    tw.WriteLine(string.Join(", ", mockInfo));
                }
            }
        }