Ejemplo n.º 1
0
        public static int OptionLength(string option)
        {
            int length = StabilityOptions.OptionLength(option);

            if (length != null)
            {
                return(length);
            }
            return(JDiff.OptionLength(option));
        }
Ejemplo n.º 2
0
        // todo: upgrade testing library - https://github.com/fluentassertions/fluentassertions.json/issues/7
        // https://stackoverflow.com/questions/52645603/how-to-compare-two-json-objects-using-c-sharp

        public static bool DeepEquals(JToken token1, JToken token2, ITestOutputHelper testOutputHelper)
        {
            var areEqual = JToken.DeepEquals(token1, token2);

            if (!areEqual)
            {
                var diff = JDiff.Differentiate(token1, token2);
                testOutputHelper.WriteLine($"Json Difference {diff}");
            }

            return(areEqual);
        }
Ejemplo n.º 3
0
 public static bool ValidOptions(string[][] options, DocErrorReporter reporter)
 {
     StabilityOptions.ValidOptions(options, reporter);
     string[][] filteredOptions = StabilityOptions.FilterOptions(options);
     return(JDiff.ValidOptions(filteredOptions, reporter));
 }
Ejemplo n.º 4
0
 public static bool Start(RootDoc root)
 {
     System.Console.Out.WriteLine(typeof(ExcludePrivateAnnotationsJDiffDoclet).Name);
     return(JDiff.Start(RootDocProcessor.Process(root)));
 }