public void DecreaseTargetTempTest() { String[] elements = stationManager.getStation(0); DataStation dataStation1 = new TestStation(float.Parse(elements[2]), float.Parse(elements[1]), elements[0]); stationManager.DecreaseTargetTemp(0); elements = stationManager.getStation(0); DataStation dataStation2 = new TestStation(float.Parse(elements[2]), float.Parse(elements[1]), elements[0]); Assert.AreEqual(dataStation1.TargetTemp - 1, dataStation2.TargetTemp); }
static async Task Main(string[] args) { await WebSocketServer.Server(_port, async client => { int x = listOfWebscoketConnection.Count; listOfWebscoketConnection.Add(client); map.Add(client, 0); await client.SendAsync(JsonSerializer.Serialize(stationManager.getStation(0))); Console.WriteLine("Server connected ..."); reactiveProgramming(); }); }
public void decreaseTemp() { StationManager.DecreaseTargetTemp(); Thread.Sleep(100); String[] xd = StationManager.getStation(); this.Station = IStation.createStation(float.Parse(xd[2]), float.Parse(xd[1]), xd[0]); }