summaryrefslogtreecommitdiff
path: root/RhSolutions.ML.Tests/Tests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RhSolutions.ML.Tests/Tests.cs')
-rw-r--r--RhSolutions.ML.Tests/Tests.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/RhSolutions.ML.Tests/Tests.cs b/RhSolutions.ML.Tests/Tests.cs
index e8203a0..0349ddb 100644
--- a/RhSolutions.ML.Tests/Tests.cs
+++ b/RhSolutions.ML.Tests/Tests.cs
@@ -3,8 +3,7 @@ namespace RhSolutions.ML.Tests;
public class Tests
{
private static string _appPath = Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]) ?? ".";
- private static string _dataPath = Path.Combine(_appPath, "..", "..", "..", ".."
- ,"RhSolutions.ML.Builder" , "Models", "model.zip");
+ private static string _dataPath = Path.Combine(_appPath, "..", "..", "..", "..", "Models", "model.zip");
private MLContext _mlContext;
private PredictionEngine<Product, TypePrediction> _predEngine;
@@ -56,4 +55,33 @@ public class Tests
var prediction = _predEngine.Predict(p);
Assert.That(prediction.Type, Is.EqualTo("Тройник RAUPIANO"));
}
+
+ [TestCase("Муфта соединительная равнопроходная 16 PX")]
+ [TestCase("Муфта 16")]
+ [TestCase("Переход 20-16")]
+ [TestCase("Переходник 20-16")]
+ public void CouplingTest(string name)
+ {
+ Product p = new()
+ {
+ Name = name
+ };
+ var prediction = _predEngine.Predict(p);
+ Assert.That(prediction.Type, Is.EqualTo("Муфта соединительная"));
+ }
+
+ [TestCase("Переходник с наружной резьбой 20-R 3/4 RX+")]
+ [TestCase("Переходник 16 1/2 НР")]
+ [TestCase("ПНР 16")]
+ [TestCase("Переход НР 16 1/2")]
+ [TestCase("Муфта НР 16 1/2")]
+ public void AdapterExternalTest(string name)
+ {
+ Product p = new()
+ {
+ Name = name
+ };
+ var prediction = _predEngine.Predict(p);
+ Assert.That(prediction.Type, Is.EqualTo("Переходник на наружную резьбу"));
+ }
} \ No newline at end of file