public void GetParts_SummandsMissingClosingBracket_ThrowsFormatException(
            string input, int posOfUnclosedBracket)
        {
            string expectedMessage =
                $"Bracket '(' at zero-based position {posOfUnclosedBracket} is missing its counterpart ')'.";

            Record.Exception(() =>
                             ParseUtil.GetParts(input))
            .Should().BeOfType <FormatException>()
            .Which.Message.Should().Be(expectedMessage);
        }
        public void GetParts_SummandsWithBrackets_OpensBrackets(string input, params string[] expected)
        {
            var parts = ParseUtil.GetParts(input).ToArray();

            parts.ShouldBeEquivalentTo(expected);
        }
 public void GetParts_SingleSummand_SinglePartWithoutSpaces(string input, string expected)
 {
     ParseUtil.GetParts(input)
     .Single()
     .Should().Be(expected);
 }
 public void GetParts_MultipleSummands_AllWithoutSpaces(string input, params string[] expected)
 {
     ParseUtil.GetParts(input)
     .ShouldBeEquivalentTo(expected);
 }
 public void GetParts_null_ThrowsArgumentNullException()
 {
     Record.Exception(() => ParseUtil.GetParts(null))
     .Should().BeOfType <ArgumentNullException>()
     .Which.ParamName.Should().Be("input");
 }