public void CalculateMinSaltSplit()
 {
     long customerId = 0;
     string selectedTrainId = "0";
     double grainsWeightTotal = 100;
     List<train> lstTrains = new List<train>() { new train() { } };
     List<vessel> lstVessels = new List<vessel>() { new vessel() };
     mockedPredictiveModelRepository.Setup(m => m.GetCustomerTrains(customerId)).Returns(lstTrains);
     mockedPredictiveModelRepository.Setup(m => m.GetCustomerVessels(customerId)).Returns(lstVessels);
     mockedPredictiveModelRepository.Setup(m => m.GetGrainsWeightTotal(Convert.ToString(customerId))).Returns(grainsWeightTotal);
     IPredictiveModelService service = new PredictiveModelService(mockedRepositoryTrain.Object, mockedRepositoryWaterData.Object, mockedPredictiveModelRepository.Object, mockedVesselRepository.Object);
     var returnObj = service.CalculateMinSaltSplit(customerId, selectedTrainId);
     Assert.IsNotNull(returnObj);
 }
 public void CalculateMinSaltSplitForTrain()
 {
     long customerId = 0;
     string selectedTrainId = "1";
     double degredation = 0;
     double grainsWeightTotal = 100;
     List<train> lstTrains = new List<train>() { new train() { } };
     List<vessel> lstVessels = new List<vessel>() { new vessel() { train_trainID = 1 } };
     mockedPredictiveModelRepository.Setup(m => m.GetCustomerTrains(customerId)).Returns(lstTrains);
     mockedPredictiveModelRepository.Setup(m => m.GetCustomerVessels(customerId)).Returns(lstVessels);
     mockedPredictiveModelRepository.Setup(m => m.GetGrainsWeightTotal(Convert.ToString(customerId))).Returns(grainsWeightTotal);
     IPredictiveModelService service = new PredictiveModelService(mockedRepositoryTrain.Object, mockedRepositoryWaterData.Object, mockedPredictiveModelRepository.Object, mockedVesselRepository.Object);
     var returnObj = service.CalculateMinSaltSplit(customerId, degredation, selectedTrainId);
     Assert.IsNotNull(returnObj);
     Assert.IsInstanceOfType(returnObj, typeof(List<double>));
     var result = (List<double>)returnObj;
     Assert.IsNotNull(result);
     mockedPredictiveModelRepository.Verify(m => m.GetCustomerTrains(customerId), Times.Once());
     mockedPredictiveModelRepository.Verify(m => m.GetCustomerVessels(customerId), Times.Once());
     mockedPredictiveModelRepository.Verify(m => m.GetGrainsWeightTotal(Convert.ToString(customerId)), Times.Once());
 }