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

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