public void TestSimulateStandby() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.ProcessData(); Assert.Equal(22, wg.H2StoreLevel); //20 start level + fill value of 2 }
public void TestStayInStandby() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.ProcessData(); Assert.Equal(SystemStatus.Standby, wg.Status); }
public void TestStandbyTrouble_MethaneStoreFull() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.MethaneStoreLevel = 91; wg.ProcessData(); Assert.Equal(SystemStatus.Trouble, wg.Status); }
public void TestStandbyTrouble_HeaterOn() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.HeaterOn = true; wg.ProcessData(); Assert.Equal(SystemStatus.Trouble, wg.Status); }
public void TestStandbyTrouble_ReactorHot() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.ReactorTemp = 426; wg.ProcessData(); Assert.Equal(SystemStatus.Trouble, wg.Status); }
public void TestCopyConstructor() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); WaterGeneratorData newwg = new WaterGeneratorData(wg); Assert.Equal(wg.Status, newwg.Status); }
public void TestTurnOn_ReactorCold() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Co2StoreLevel = 76; wg.ProcessData(); Assert.True(wg.HeaterOn); }
public void TestH2Full_ChangeToProcessing() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.H2StoreLevel = 76; wg.ProcessData(); Assert.Equal(SystemStatus.Processing, wg.Status); }
public void TestGenerateStandbyData() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); WaterGeneratorData newwg = new WaterGeneratorData(wg); Assert.NotEqual(wg.ReactorTemp, newwg.ReactorTemp); }
public void TestTurnOn_ReactorHot() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Co2StoreLevel = 76; wg.ReactorTemp = 500; wg.ProcessData(); Assert.False(wg.HeaterOn); }
public void TestProcessingIncreasesMethane() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 500; wg.SeperatorMotorSpeed = 2000; wg.ProcessData(); Assert.Equal(35, wg.MethaneStoreLevel); }
public void TestProcessingDecreasesCo2() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 400; wg.SeperatorMotorSpeed = 2000; wg.ProcessData(); Assert.Equal(22, wg.Co2StoreLevel); }
public void TestProcessingTrouble_SeperatorToSlow() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 500; wg.SeperatorOn = true; wg.SeperatorMotorSpeed = 999; wg.ProcessData(); Assert.Equal(SystemStatus.Trouble, wg.Status); }
public void TestProcessingTrouble_HeaterOnReactorHot() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 651; wg.HeaterOn = true; wg.SeperatorOn = true; wg.SeperatorMotorSpeed = 2000; wg.ProcessData(); Assert.Equal(SystemStatus.Trouble, wg.Status); }
public void TestProcessingTrouble_MethaneFull() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 475; wg.SeperatorOn = true; wg.SeperatorMotorSpeed = 2000; wg.MethaneStoreLevel = 100; wg.ProcessData(); Assert.Equal(SystemStatus.Trouble, wg.Status); }
public void TestTurnOff() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 475; wg.SeperatorOn = true; wg.SeperatorMotorSpeed = 2000; wg.H2StoreLevel = 2; wg.ProcessData(); Assert.False(wg.PumpOn); }
public void TestProcessingCo2Empty() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 475; wg.SeperatorOn = true; wg.SeperatorMotorSpeed = 2000; wg.Co2StoreLevel = 4; wg.ProcessData(); Assert.Equal(0, wg.Co2StoreLevel); }
public void TestH2Empty_ChangeToStandby() { WaterGeneratorData wg = new WaterGeneratorData(); wg.SeedData(); wg.Status = SystemStatus.Processing; wg.PumpOn = true; wg.ReactorTemp = 475; wg.SeperatorOn = true; wg.SeperatorMotorSpeed = 2000; wg.H2StoreLevel = 2; wg.ProcessData(); Assert.Equal(SystemStatus.Standby, wg.Status); }