public void TestBatteryThreadConsuming() { ISHESToComponentsQueues queues = new SHESToComponentsQueueMock(); BatteryList batteryList = new BatteryList(ref queues); Thread.Sleep(100); Assert.IsTrue(batteryList.IsConsumig); }
public void TestSolarPanelThread() { ISHESToComponentsQueues queues = new SHESToComponentsQueueMock(); SolarPanelList solarPanelList = new SolarPanelList(ref queues); Thread.Sleep(100); Assert.IsTrue(solarPanelList.SunPower == 100); }
public void TestConsumerThread() { ISHESToComponentsQueues queues = new SHESToComponentsQueueMock(); ConsumersList consumersList = new ConsumersList(ref queues); Thread.Sleep(100); Request r; queues.ConsumersRequest.TryDequeue(out r); Assert.IsNotNull(r); }
public void TestBatteryThreadGenerating() { ISHESToComponentsQueues queues = new SHESToComponentsQueueMock(); Response response; queues.BatteryResponses.TryDequeue(out response); queues.BatteryResponses.Enqueue(new Response(0, "test")); BatteryList batteryList = new BatteryList(ref queues); Assert.IsFalse(batteryList.IsConsumig); }