aboutsummaryrefslogtreecommitdiff
path: root/RhSolutions.Tests
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-05-23 07:07:16 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-05-23 07:07:16 +0300
commit16b5ddedb1c89c0bdad56eab384f8e6cecaf2107 (patch)
tree011b97c25002ba83e05d5d55258edcc9135cdd79 /RhSolutions.Tests
parent733440392e2c02b9488b76dc0ede643617949bb7 (diff)
Rename Magic to Guess
Diffstat (limited to 'RhSolutions.Tests')
-rw-r--r--RhSolutions.Tests/CanDoGuess.cs (renamed from RhSolutions.Tests/CanDoMagic.cs)16
-rw-r--r--RhSolutions.Tests/TestWorkbooks/TargetSpecificationGuess.xlsx (renamed from RhSolutions.Tests/TestWorkbooks/TargetSpecificationMagic.xlsx)bin11597 -> 11597 bytes
-rw-r--r--RhSolutions.Tests/TestWorkbooks/TestSpecificationGuess.xlsx (renamed from RhSolutions.Tests/TestWorkbooks/TestSpecificationMagic.xlsx)bin11669 -> 11669 bytes
3 files changed, 7 insertions, 9 deletions
diff --git a/RhSolutions.Tests/CanDoMagic.cs b/RhSolutions.Tests/CanDoGuess.cs
index d3a0bf9..c801af7 100644
--- a/RhSolutions.Tests/CanDoMagic.cs
+++ b/RhSolutions.Tests/CanDoGuess.cs
@@ -5,33 +5,31 @@ using System.IO;
namespace RhSolutions.Tests;
[ExcelTestSettings(OutOfProcess = true)]
-public class CanDoMagic : IDisposable
+public class CanDoGuess : IDisposable
{
private RhSolutionsAddIn _addIn;
- //private ReaderFactory _readerFactory;
private IReader _reader;
- public CanDoMagic()
+ public CanDoGuess()
{
_addIn = new();
_addIn.AutoOpen();
- //_readerFactory = RhSolutionsAddIn.ServiceProvider.GetRequiredService<ReaderFactory>();
- _reader = new MagicReader(Util.Application);
+ _reader = new GuessReader(Util.Application);
}
- [ExcelFact(Workbook = @"..\..\..\TestWorkbooks\TestSpecificationMagic.xlsx")]
+ [ExcelFact(Workbook = @"..\..\..\TestWorkbooks\TestSpecificationGuess.xlsx")]
public void CanWrite()
{
Worksheet sourceSheet = Util.Workbook.Worksheets[1];
- RhSolutionsAddIn.Configuration.SetPriceListPath(Path.GetFullPath(@"..\..\..\TestWorkbooks\TargetSpecificationMagic.xlsx"));
+ RhSolutionsAddIn.Configuration.SetPriceListPath(Path.GetFullPath(@"..\..\..\TestWorkbooks\TargetSpecificationGuess.xlsx"));
var products = _reader.ReadProducts(new[] { sourceSheet });
var _writer = new ExcelWriter(Util.Application, RhSolutionsAddIn.Configuration);
_writer.WriteProducts(products);
Worksheet targetSheet = Util.Application.ActiveWindow.ActiveSheet;
var targetProducts = _reader.ReadProducts(new[] { targetSheet });
- Assert.Equal("TestSpecificationMagic", products.First().Item1);
- Assert.Equal("TargetSpecificationMagic", targetProducts.First().Item1);
+ Assert.Equal("TestSpecificationGuess", products.First().Item1);
+ Assert.Equal("TargetSpecificationGuess", targetProducts.First().Item1);
Assert.Equal(products.First().Item2.Count(), targetProducts.First().Item2.Count());
Assert.Equal(products.First().Item2.Values.Sum(), targetProducts.First().Item2.Values.Sum());
}
diff --git a/RhSolutions.Tests/TestWorkbooks/TargetSpecificationMagic.xlsx b/RhSolutions.Tests/TestWorkbooks/TargetSpecificationGuess.xlsx
index e7bae5f..e7bae5f 100644
--- a/RhSolutions.Tests/TestWorkbooks/TargetSpecificationMagic.xlsx
+++ b/RhSolutions.Tests/TestWorkbooks/TargetSpecificationGuess.xlsx
Binary files differ
diff --git a/RhSolutions.Tests/TestWorkbooks/TestSpecificationMagic.xlsx b/RhSolutions.Tests/TestWorkbooks/TestSpecificationGuess.xlsx
index d268c3e..d268c3e 100644
--- a/RhSolutions.Tests/TestWorkbooks/TestSpecificationMagic.xlsx
+++ b/RhSolutions.Tests/TestWorkbooks/TestSpecificationGuess.xlsx
Binary files differ