private static void TestGetValidKey(string input, string expected) { string actual = RepositoryKeyUtilities.GetValidKey(input); actual.Should().Be(expected, "Unexpected key returned"); RepositoryKeyUtilities.ThrowIfInvalid(expected); // should not throw on values returned by GetValidKey }
public RoslynPluginJarBuilder SetRepositoryKey(string key) { RepositoryKeyUtilities.ThrowIfInvalid(key); this.repositoryKey = key; return(this); }
private static void CheckThrowIfInvalidThrows(string input) { Action action = () => RepositoryKeyUtilities.ThrowIfInvalid(input); action.Should().ThrowExactly <ArgumentException>(); }
private static void CheckThrowIfInvalidThrows(string input) { AssertException.Expect <ArgumentException>(() => RepositoryKeyUtilities.ThrowIfInvalid(input)); }