Last active
November 7, 2018 22:45
-
-
Save gdyrrahitis/b3755488f8c8379277309bff5340ce91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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