aboutsummaryrefslogtreecommitdiff
path: root/RhSolutions.Tests
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-05-27 07:37:36 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-05-27 07:37:36 +0300
commit3e4a5e65639c7c48457e0c6c92e16c527366c25c (patch)
treee31d65150b0bd1f3eae5fc177ab3f8f59e21dbd7 /RhSolutions.Tests
parent1c655f1ab5ac8a80f31b017173ce1f48c04fd79d (diff)
Edit Replace and New Variant tests
Diffstat (limited to 'RhSolutions.Tests')
-rw-r--r--RhSolutions.Tests/CanWriteProducts.cs19
-rw-r--r--RhSolutions.Tests/TestWorkbooks/TargetSpecificationNewVariant.xlsxbin9347 -> 9388 bytes
-rw-r--r--RhSolutions.Tests/TestWorkbooks/TargetSpecificationReplaced.xlsxbin9351 -> 9404 bytes
-rw-r--r--RhSolutions.Tests/TestWorkbooks/TestSpecificationNewVariant.xlsxbin9175 -> 9187 bytes
-rw-r--r--RhSolutions.Tests/TestWorkbooks/TestSpecificationReplaced.xlsxbin9174 -> 9227 bytes
5 files changed, 11 insertions, 8 deletions
diff --git a/RhSolutions.Tests/CanWriteProducts.cs b/RhSolutions.Tests/CanWriteProducts.cs
index d53931d..c8820a7 100644
--- a/RhSolutions.Tests/CanWriteProducts.cs
+++ b/RhSolutions.Tests/CanWriteProducts.cs
@@ -79,10 +79,13 @@ public class CanWriteProducts : IDisposable
Assert.Equal("TestSpecificationReplaced", products.First().Item1);
Assert.Equal("TargetSpecificationReplaced", targetProducts.First().Item1);
- Assert.Single(targetProducts.First().Item2);
- var product = targetProducts.First().Item2.First().Key;
- Assert.Contains("Молот Тора", product.Name);
- Assert.Contains("15555551555", product.Name);
+ var result = targetProducts.First().Item2.ToArray();
+ Assert.Contains("Молот Тора", result[0].Key.Name);
+ Assert.Contains("15555551555", result[0].Key.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")]
@@ -98,10 +101,10 @@ public class CanWriteProducts : IDisposable
Assert.Equal("TestSpecificationNewVariant", products.First().Item1);
Assert.Equal("TargetSpecificationNewVariant", targetProducts.First().Item1);
- Assert.Single(targetProducts.First().Item2);
- var product = targetProducts.First().Item2.First().Key;
- Assert.Contains("Молот Тора", product.Name);
- Assert.Contains("15555551555", product.Name);
+ var result = targetProducts.First().Item2.ToArray();
+ Assert.Contains("Молот Тора", result[0].Key.Name);
+ Assert.Contains("15555551555", result[0].Key.Name);
+ Assert.Equal(1, result[0].Value);
}
public void Dispose()
diff --git a/RhSolutions.Tests/TestWorkbooks/TargetSpecificationNewVariant.xlsx b/RhSolutions.Tests/TestWorkbooks/TargetSpecificationNewVariant.xlsx
index 56d1cdc..b28b349 100644
--- a/RhSolutions.Tests/TestWorkbooks/TargetSpecificationNewVariant.xlsx
+++ b/RhSolutions.Tests/TestWorkbooks/TargetSpecificationNewVariant.xlsx
Binary files differ
diff --git a/RhSolutions.Tests/TestWorkbooks/TargetSpecificationReplaced.xlsx b/RhSolutions.Tests/TestWorkbooks/TargetSpecificationReplaced.xlsx
index af7d045..be08ce8 100644
--- a/RhSolutions.Tests/TestWorkbooks/TargetSpecificationReplaced.xlsx
+++ b/RhSolutions.Tests/TestWorkbooks/TargetSpecificationReplaced.xlsx
Binary files differ
diff --git a/RhSolutions.Tests/TestWorkbooks/TestSpecificationNewVariant.xlsx b/RhSolutions.Tests/TestWorkbooks/TestSpecificationNewVariant.xlsx
index f6c3d96..d8b4f70 100644
--- a/RhSolutions.Tests/TestWorkbooks/TestSpecificationNewVariant.xlsx
+++ b/RhSolutions.Tests/TestWorkbooks/TestSpecificationNewVariant.xlsx
Binary files differ
diff --git a/RhSolutions.Tests/TestWorkbooks/TestSpecificationReplaced.xlsx b/RhSolutions.Tests/TestWorkbooks/TestSpecificationReplaced.xlsx
index 7900714..c40b4a9 100644
--- a/RhSolutions.Tests/TestWorkbooks/TestSpecificationReplaced.xlsx
+++ b/RhSolutions.Tests/TestWorkbooks/TestSpecificationReplaced.xlsx
Binary files differ