diff options
author | Serghei Cebotari <serghei@cebotari.ru> | 2023-09-20 13:46:55 +0300 |
---|---|---|
committer | Serghei Cebotari <serghei@cebotari.ru> | 2023-09-20 13:46:55 +0300 |
commit | cde4fca02029cf3552cb63c050d3002bab68828f (patch) | |
tree | 35f1c25e6c0089708f607dd11a81682209ce4123 /RhSolutions.ML.Tests | |
parent | 0c85e000b401c1bab36d07b82c4a0b727562c42a (diff) |
Solution organize
Diffstat (limited to 'RhSolutions.ML.Tests')
-rw-r--r-- | RhSolutions.ML.Tests/RhSolutions.ML.Tests.csproj | 2 | ||||
-rw-r--r-- | RhSolutions.ML.Tests/Tests.cs | 32 |
2 files changed, 31 insertions, 3 deletions
diff --git a/RhSolutions.ML.Tests/RhSolutions.ML.Tests.csproj b/RhSolutions.ML.Tests/RhSolutions.ML.Tests.csproj index 697d9a0..c37ac53 100644 --- a/RhSolutions.ML.Tests/RhSolutions.ML.Tests.csproj +++ b/RhSolutions.ML.Tests/RhSolutions.ML.Tests.csproj @@ -19,7 +19,7 @@ </ItemGroup> <ItemGroup> - <ProjectReference Include="..\RhSolutions.ML.Builder\RhSolutions.ML.Builder.csproj" /> + <ProjectReference Include="..\RhSolutions.ML.Lib\RhSolutions.ML.Lib.csproj" /> </ItemGroup> </Project> 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 |