Exemple #1
0
        public void ReplaceCodes(string expression, string expected)
        {
            var replacementByCode = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase)
            {
                { "Apache-2.0", "[Apache]" },
                { "MIT", "[MIT]" },
                { "MIT2", "[MIT 2]" },
                { "GPL-2.0", "[GPL-2.0]" }
            };

            LicenseExpression.ReplaceCodes(expression, i => replacementByCode[i]).ShouldBe(expected);
        }
Exemple #2
0
 public void GetCodes(string expression, params string[] expectedCodes)
 {
     LicenseExpression.GetCodes(expression).ShouldBe(expectedCodes);
 }