Compare commits
3 Commits
ef35ac9990
...
931b08e00d
Author | SHA1 | Date | |
---|---|---|---|
931b08e00d | |||
675c491d6f | |||
1246b55fa5 |
35
.vscode/launch.json
vendored
Normal file
35
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||||
|
// Use hover for the description of the existing attributes
|
||||||
|
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
|
||||||
|
"name": ".NET Core Launch (web)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
|
"program": "${workspaceFolder}/RhSolutions.Api/bin/Debug/net6.0/RhSolutions.Api.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/RhSolutions.Api",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"sourceFileMap": {
|
||||||
|
"/Views": "${workspaceFolder}/Views"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
41
.vscode/tasks.json
vendored
Normal file
41
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/RhSolutions.sln",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/RhSolutions.sln",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/RhSolutions.sln"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -4,6 +4,7 @@ public class RautitanFittingsTests : ProductQueryModifierTests
|
|||||||
{
|
{
|
||||||
[TestCase("Гильза 16", "Монтажная гильза 16")]
|
[TestCase("Гильза 16", "Монтажная гильза 16")]
|
||||||
[TestCase("Пресс-втулка 20", "Монтажная гильза 20")]
|
[TestCase("Пресс-втулка 20", "Монтажная гильза 20")]
|
||||||
|
[TestCase("UPONOR Q&E EVOLUTION КОЛЬЦО БЕЛОЕ 16 '900Ф", "Монтажная гильза 16")]
|
||||||
public void SleeveTest(string query, string modified)
|
public void SleeveTest(string query, string modified)
|
||||||
=> Execute(productType: "Монтажная гильза", query, modified);
|
=> Execute(productType: "Монтажная гильза", query, modified);
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ public class RautitanFittingsTests : ProductQueryModifierTests
|
|||||||
|
|
||||||
[TestCase("муфта 20", "Муфта соединительная равнопроходная 20")]
|
[TestCase("муфта 20", "Муфта соединительная равнопроходная 20")]
|
||||||
[TestCase("переходник 20-16", "Муфта соединительная переходная 20-16")]
|
[TestCase("переходник 20-16", "Муфта соединительная переходная 20-16")]
|
||||||
|
[TestCase("переходник 16-20", "Муфта соединительная переходная 20-16")]
|
||||||
[TestCase("Соединение труба-труба 20/20, бронза", "Муфта соединительная равнопроходная 20")]
|
[TestCase("Соединение труба-труба 20/20, бронза", "Муфта соединительная равнопроходная 20")]
|
||||||
[TestCase("Муфта соединительная переходная 20x16 для труб из сшитого полиэтилена аксиальный", "Муфта соединительная переходная 20-16")]
|
[TestCase("Муфта соединительная переходная 20x16 для труб из сшитого полиэтилена аксиальный", "Муфта соединительная переходная 20-16")]
|
||||||
public void CouplingTest(string query, string modified)
|
public void CouplingTest(string query, string modified)
|
||||||
@ -119,4 +121,8 @@ public class RautitanFittingsTests : ProductQueryModifierTests
|
|||||||
[TestCase("Фитинг подключения L и T-образной медной трубки - D15 - G 3/4", "Резьбозажимное соединение для металлической трубки G 3/4 -15")]
|
[TestCase("Фитинг подключения L и T-образной медной трубки - D15 - G 3/4", "Резьбозажимное соединение для металлической трубки G 3/4 -15")]
|
||||||
public void EuroconeConnectionBendTest(string query, string modified)
|
public void EuroconeConnectionBendTest(string query, string modified)
|
||||||
=> Execute(productType: "Резьбозажимное для трубки", query, modified);
|
=> Execute(productType: "Резьбозажимное для трубки", query, modified);
|
||||||
|
|
||||||
|
[TestCase("Ниппель", "К-т двух резьбозажим. нипелей с нар.резьбой 1/2х3/4")]
|
||||||
|
public void NippelTest(string query, string modified)
|
||||||
|
=> Execute(productType: "Ниппель", query, modified);
|
||||||
}
|
}
|
||||||
|
@ -5,19 +5,22 @@ public class Coupling : DrinkingWaterHeatingFitting
|
|||||||
protected override string _title => "Муфта соединительная";
|
protected override string _title => "Муфта соединительная";
|
||||||
protected override string? BuildRhSolutionsName(string query)
|
protected override string? BuildRhSolutionsName(string query)
|
||||||
{
|
{
|
||||||
var diameters = _diameter.Matches(query);
|
var diametersMatches = _diameter.Matches(query);
|
||||||
if (diameters.Count == 0)
|
if (diametersMatches.Count == 0)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (diameters.Count < 2 ||
|
var diameters = diametersMatches.Select(x => x.Groups["Diameter"].Value)
|
||||||
diameters.Count > 1 && diameters[0].Groups["Diameter"].Value == diameters[1].Groups["Diameter"].Value)
|
.Take(2)
|
||||||
|
.OrderByDescending(x => int.Parse(x))
|
||||||
|
.ToArray();
|
||||||
|
if (diameters.Length == 1 || diameters[0] == diameters[1])
|
||||||
{
|
{
|
||||||
return $"{_title} равнопроходная {diameters[0].Groups["Diameter"]}";
|
return $"{_title} равнопроходная {diameters[0]}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $"{_title} переходная {diameters[0].Groups["Diameter"]}-{diameters[1].Groups["Diameter"]}";
|
return $"{_title} переходная {diameters[0]}-{diameters[1]}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
|
||||||
|
|
||||||
|
public class Nippel : DrinkingWaterHeatingFitting
|
||||||
|
{
|
||||||
|
protected override string? BuildRhSolutionsName(string query)
|
||||||
|
{
|
||||||
|
return "К-т двух резьбозажим. нипелей с нар.резьбой 1/2х3/4";
|
||||||
|
}
|
||||||
|
}
|
@ -57,6 +57,8 @@ public class ProductQueryModifierFactory
|
|||||||
return new EuroconeAdapter();
|
return new EuroconeAdapter();
|
||||||
case "Резьбозажимное для трубки":
|
case "Резьбозажимное для трубки":
|
||||||
return new EuroconeConnectionBend();
|
return new EuroconeConnectionBend();
|
||||||
|
case "Ниппель":
|
||||||
|
return new Nippel();
|
||||||
case "Заглушка труб RAUTITAN":
|
case "Заглушка труб RAUTITAN":
|
||||||
return new DummyPlug();
|
return new DummyPlug();
|
||||||
case "Flex":
|
case "Flex":
|
||||||
|
Loading…
Reference in New Issue
Block a user