public void Predict_NullModel() { var predictor = new TestFasterTreePredictor(); Assert.IsNotNull(predictor); var result = predictor.Predict <BasePredictorData, BaseDataPrediction>(null, null); Assert.IsTrue(result.IsNullOrError); Assert.IsTrue(result.Error.GetType() == typeof(ArgumentNullException)); }
public void Predict_NullTestData() { var predictor = new TestFasterTreePredictor(); var model = predictor.LoadOrGenerateModelAsync <BasePredictorData, BaseDataPrediction>(null).Result; var result = predictor.Predict(model.Value, null); Assert.IsTrue(result.IsNullOrError); Assert.IsTrue(result.Error.GetType() == typeof(ArgumentNullException)); }