Пример #1
0
 public TemplateTest(ITestOutputHelper output) : base(output)
 {
     if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
     {
         Approvals.UseAssemblyLocationForApprovedFiles();
     }
 }
Пример #2
0
        public SweepablePipelineTests(ITestOutputHelper output) : base(output)
        {
            _jsonSerializerOptions = new JsonSerializerOptions()
            {
                WriteIndented = true,
                Converters    =
                {
                    new JsonStringEnumConverter(), new DoubleToDecimalConverter(), new FloatToDecimalConverter(),
                },
            };

            if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
            {
                Approvals.UseAssemblyLocationForApprovedFiles();
            }
        }
Пример #3
0
        public void Wiki_column_inference_result_should_be_serializable()
        {
            // DiffEngine can't check for Helix, so the environment variable checks for helix.
            if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
            {
                Approvals.UseAssemblyLocationForApprovedFiles();
            }

            var wiki = Path.Combine("TestData", "wiki-column-inference.json");

            using (var stream = new StreamReader(wiki))
            {
                var json = stream.ReadToEnd();
                var columnInferenceResults = JsonConvert.DeserializeObject <ColumnInferenceResults>(json);
                Approvals.Verify(JsonConvert.SerializeObject(columnInferenceResults, Formatting.Indented));
            }
        }
Пример #4
0
        public SweepableExtensionTest(ITestOutputHelper output)
            : base(output)
        {
            this._jsonSerializerOptions = new JsonSerializerOptions()
            {
                WriteIndented = true,
                Converters    =
                {
                    new JsonStringEnumConverter(), new DoubleToDecimalConverter(), new FloatToDecimalConverter(),
                },
            };

            this._jsonSerializerOptions.Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping;

            if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
            {
                Approvals.UseAssemblyLocationForApprovedFiles();
            }
        }
Пример #5
0
 public void ShouldResolveCorrectPath()
 {
     Approvals.UseAssemblyLocationForApprovedFiles();
     Approvals.Verify("text");
 }