0
0

Rename Drinking to Sanitary

This commit is contained in:
Serghei Cebotari 2023-10-13 22:11:59 +03:00
parent 432a6fb79d
commit f38dc2f199
4 changed files with 20 additions and 19 deletions

View File

@ -57,6 +57,6 @@ public class RautitanFittingsTests : ProductQueryModifierTests
[TestCase("Фиксатор поворота с кольцами 90°, 32", "Фиксатор поворота с кольцами 90° 32")]
[TestCase("Фиксатор поворота с кольцами 45°, 16", "Фиксатор поворота с кольцами 45° 16")]
public void BendFormerDrinkingTest(string query, string modified)
public void BendFormerSanitaryTest(string query, string modified)
=> Execute(productType: "Фиксатор поворота водоснабжение", query, modified);
}

View File

@ -20,20 +20,3 @@ public class BendFormerHeating : DrinkingWaterHeatingFitting
return $"{_title} {diameter}/{angle}°";
}
}
public class BendFormerDrinking : DrinkingWaterHeatingFitting
{
protected override string _title => "Фиксатор поворота с кольцами";
protected override string? BuildRhSolutionsName(string query)
{
var diameterMatch = _diameter.Match(query);
if (!diameterMatch.Success)
{
return null;
}
string diameter = diameterMatch.Groups["Diameter"].Value;
var angleMatch = _angle.Match(query);
string angle = angleMatch.Success ? angleMatch.Groups["Angle"].Value : "90";
return $"{_title} {angle}° {diameter}";
}
}

View File

@ -0,0 +1,18 @@
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public class BendFormerSanitary : DrinkingWaterHeatingFitting
{
protected override string _title => "Фиксатор поворота с кольцами";
protected override string? BuildRhSolutionsName(string query)
{
var diameterMatch = _diameter.Match(query);
if (!diameterMatch.Success)
{
return null;
}
string diameter = diameterMatch.Groups["Diameter"].Value;
var angleMatch = _angle.Match(query);
string angle = angleMatch.Success ? angleMatch.Groups["Angle"].Value : "90";
return $"{_title} {angle}° {diameter}";
}
}

View File

@ -36,7 +36,7 @@ public class ProductQueryModifierFactory
case "Фиксатор поворота отопление":
return new BendFormerHeating();
case "Фиксатор поворота водоснабжение":
return new BendFormerDrinking();
return new BendFormerSanitary();
case "Flex":
return new FlexPipe();
case "Pink":