Esempio n. 1
0
        private void SetupFluentAssertion()
        {
            //Hook into FluentAssertion so we see very useful
            //YamlTest context information. TestLine, expected, got, etc...
            FluentAssertions.Common.Services.ResetToDefaults();
            var hook = FluentAssertions.Common.Services.ThrowException;

            FluentAssertions.Common.Services.ThrowException = s =>
            {
                var logContext = TestLogContext.LogText();
                hook(logContext + s);
            };
        }
Esempio n. 2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine();
            sb.AppendLine($"Test:");
            sb.AppendLine($"\t{TestFile}, LineNum: {LineNum}");
            sb.AppendLine("Expected ReQL:");
            sb.AppendLine($"\t{ExpectedOriginal}");
            sb.AppendLine("Expected C#/Java:");
            sb.AppendLine($"\t{ExpectedJava}");
            sb.AppendLine("Run ReQL:");
            sb.AppendLine($"\t{Original}");
            sb.AppendLine("Run C#/Java:");
            sb.AppendLine($"\t{Java}");
            sb.AppendLine($"RunOpts: {JsonConvert.SerializeObject(RunOpts)}");
            sb.AppendLine(TestLogContext.LogText());
            sb.AppendLine();
            return(sb.ToString());
        }