diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-03-23 07:08:30 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-03-23 07:08:30 +0300 |
commit | 6497738c2d7bf597b92fac2793a061a13e1b102d (patch) | |
tree | 0e2089c681eedef860dbb984839fa62c995dea5e /RhSolutions.Tests/CalculationTests.cs | |
parent | 4f448f203471a19a1444555a895f503515ad2fda (diff) |
Add Test template
Diffstat (limited to 'RhSolutions.Tests/CalculationTests.cs')
-rw-r--r-- | RhSolutions.Tests/CalculationTests.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/RhSolutions.Tests/CalculationTests.cs b/RhSolutions.Tests/CalculationTests.cs new file mode 100644 index 0000000..d6c54c2 --- /dev/null +++ b/RhSolutions.Tests/CalculationTests.cs @@ -0,0 +1,30 @@ +namespace RhSolutions.Tests; + +public class CalculationTests : IDisposable +{ + private Workbook workbook; + + public CalculationTests() + { + workbook = Util.Application.Workbooks.Add(); + } + + public void Dispose() + { + workbook.Close(SaveChanges: false); + } + + [ExcelFact] + public void NumbersAddCorrectly() + { + var ws = workbook.Sheets[1]; + + ws.Range["A1"].Value = 2.0; + ws.Range["A2"].Value = 3.0; + ws.Range["A3"].Formula = "= A1 + A2"; + + var result = ws.Range["A3"].Value; + + Assert.Equal(5.0, result); + } +}
\ No newline at end of file |