Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
 public RoslynPluginJarBuilder SetRepositoryKey(string key)
 {
     RepositoryKeyUtilities.ThrowIfInvalid(key);
     this.repositoryKey = key;
     return(this);
 }
Exemplo n.º 3
0
        private static void CheckThrowIfInvalidThrows(string input)
        {
            Action action = () => RepositoryKeyUtilities.ThrowIfInvalid(input);

            action.Should().ThrowExactly <ArgumentException>();
        }
Exemplo n.º 4
0
 private static void CheckThrowIfInvalidThrows(string input)
 {
     AssertException.Expect <ArgumentException>(() => RepositoryKeyUtilities.ThrowIfInvalid(input));
 }