Edit Replace and New Variant tests

This commit is contained in:
Sergey Chebotar 2023-05-27 07:37:36 +03:00
parent 1c655f1ab5
commit 3e4a5e6563
5 changed files with 11 additions and 8 deletions

View File

@ -79,10 +79,13 @@ public class CanWriteProducts : IDisposable
Assert.Equal("TestSpecificationReplaced", products.First().Item1); Assert.Equal("TestSpecificationReplaced", products.First().Item1);
Assert.Equal("TargetSpecificationReplaced", targetProducts.First().Item1); Assert.Equal("TargetSpecificationReplaced", targetProducts.First().Item1);
Assert.Single(targetProducts.First().Item2); var result = targetProducts.First().Item2.ToArray();
var product = targetProducts.First().Item2.First().Key; Assert.Contains("Молот Тора", result[0].Key.Name);
Assert.Contains("Молот Тора", product.Name); Assert.Contains("15555551555", result[0].Key.Name);
Assert.Contains("15555551555", product.Name); Assert.Equal(1, result[0].Value);
Assert.Contains("Нога Вирта", result[1].Key.Name);
Assert.Contains("17777771777", result[1].Key.Name);
Assert.Equal(1, result[1].Value);
} }
[ExcelFact(Workbook = @"..\..\..\TestWorkbooks\TestSpecificationNewVariant.xlsx")] [ExcelFact(Workbook = @"..\..\..\TestWorkbooks\TestSpecificationNewVariant.xlsx")]
@ -98,10 +101,10 @@ public class CanWriteProducts : IDisposable
Assert.Equal("TestSpecificationNewVariant", products.First().Item1); Assert.Equal("TestSpecificationNewVariant", products.First().Item1);
Assert.Equal("TargetSpecificationNewVariant", targetProducts.First().Item1); Assert.Equal("TargetSpecificationNewVariant", targetProducts.First().Item1);
Assert.Single(targetProducts.First().Item2); var result = targetProducts.First().Item2.ToArray();
var product = targetProducts.First().Item2.First().Key; Assert.Contains("Молот Тора", result[0].Key.Name);
Assert.Contains("Молот Тора", product.Name); Assert.Contains("15555551555", result[0].Key.Name);
Assert.Contains("15555551555", product.Name); Assert.Equal(1, result[0].Value);
} }
public void Dispose() public void Dispose()