public void AddCellAddress_WithAddress_AddsAddressToFormula()
        {
            // Arrange
            CellAddress expectedAddress = CellAddress.Create($"A{_fixture.Create<int>()}");

            // Act
            IFormulaBuilder result = _formulaBuilder.AddCellAddress(expectedAddress);

            // Assert
            var formula = result.Build();

            formula.Should().Be(expectedAddress.ToString());
        }
        public void AddSummationSign_WithoutPreviousActions_AddsSummationSignToFormula()
        {
            // Arrange
            var expectedFormula = "+";

            // Act
            IFormulaBuilder result = _formulaBuilder.AddSummationSign();

            // Assert
            var formula = result.Build();

            formula.Should().Be(expectedFormula);
        }
        public void AddClosingParenthesis_WithoutPreviousActions_AddsClosingParenthesisToFormula()
        {
            // Arrange
            var expectedFormula = ")";

            // Act
            IFormulaBuilder result = _formulaBuilder.AddClosingParenthesis();

            // Assert
            var formula = result.Build();

            formula.Should().Be(expectedFormula);
        }
 public override ISpreadsheetWriter PlaceCustomFormula(IFormulaBuilder formulaBuilder)
 {
     Spreadsheet[CurrentPosition.X, CurrentPosition.Y] = formulaBuilder.Build();
     return(this);
 }