public ReturnValue StopCurrentBikeTest(out BikeTest oldBikeTest)
 {
     if (TestStatus == BikeTestStatus.Started)
     {
         oldBikeTest = _lastBikeTestBuff;
         return ReturnValue.Success;
     }
     else if (TestStatus == BikeTestStatus.Stopped)
     {
         oldBikeTest = null;
         return ReturnValue.AlreadyStopped;
     }
     else
     {
         oldBikeTest = null;
         return ReturnValue.Error;
     }
 }
Esempio n. 2
0
 public void AddBikeTest(BikeTest bikeTest)
 {
     _bikeTests.Add(bikeTest);
 }
 public ReturnValue StartNewBikeTest(BikeTest bikeTest)
 {
     if (TestStatus == BikeTestStatus.Stopped)
     {
         if (bikeTest != null)
         {
             _lastBikeTestBuff = bikeTest;
         }
         return ReturnValue.Success;
     }
     else if (TestStatus == BikeTestStatus.Started)
     {
         return ReturnValue.AlreadyStarted;
     }
     else
     {
         return ReturnValue.Error;
     }
 }