public void Setup() { _id = Guid.NewGuid().ToString(); _configFake = new ConfigFake { DatacardsDirectory = "this is a directory" }; _fileSystemFake = new FileSystemFake(); _pluginFactory = new PluginFactoryFake(); _serializer = new Serializer(); _datacard = CreateDatacard(); }
// Creating Datacards services on different threads. private void initDataCards() { Datacard dc2 = new Datacard("CD800-2", Datacards.IP_DC2, Datacards.NumID_SM_DC2); DatacardStats datacardStats2 = new DatacardStats(this, dc2); Thread thread_7 = new Thread(datacardStats2.getDatacardStatus); thread_7.Start(); Datacard dc3 = new Datacard("CD800-3", Datacards.IP_DC3, Datacards.NumID_SM_DC3); DatacardStats datacardStats3 = new DatacardStats(this, dc3); Thread thread_8 = new Thread(datacardStats3.getDatacardStatus); thread_8.Start(); Datacard dc4 = new Datacard("CD800-4", Datacards.IP_DC4, Datacards.NumID_SM_DC4); DatacardStats datacardStats4 = new DatacardStats(this, dc4); Thread thread_9 = new Thread(datacardStats4.getDatacardStatus); thread_9.Start(); Datacard dc5 = new Datacard("CD800-5", Datacards.IP_DC5, Datacards.NumID_SM_DC5); DatacardStats datacardStats5 = new DatacardStats(this, dc5); Thread thread_10 = new Thread(datacardStats5.getDatacardStatus); thread_10.Start(); Datacard dc6 = new Datacard("CD800-6", Datacards.IP_DC6, Datacards.NumID_SM_DC6); DatacardStats datacardStats6 = new DatacardStats(this, dc6); Thread thread_11 = new Thread(datacardStats6.getDatacardStatus); thread_11.Start(); Datacard dc7 = new Datacard("CD800-7", Datacards.IP_DC7, Datacards.NumID_SM_DC7); DatacardStats datacardStats7 = new DatacardStats(this, dc7); Thread thread_12 = new Thread(datacardStats7.getDatacardStatus); thread_12.Start(); }