Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class HasValidOpeningClosingBrackets
{
[Theory]
[InlineData("hi", true)]
[InlineData("{}", true)]
[InlineData("[}", false)]
[InlineData("{hi(george)}", true)]
[InlineData("{hi(george]}", false)]
[InlineData("[{hi(george]})", false)]
[InlineData("([{[}}])", false)]
public void ReturnsExpectedOutputForStringWithBrackets(string input, bool expected)
{
// Arrange | Act
var result = Analyzer.HasValidOpeningClosingBrackets(input);
// Assert
Equal(expected, result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.