mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-25 01:09:14 +02:00
Version 2.x (#1359)
* Version 2.x * Setup .NET 9 * 12 * cleanup some #if for NETSTANDARD1_3 * cleanup + fix tests for net8 * openapi * NO ConfigureAwait(false) + cleanup * . * #endif * HashSet * WireMock.Net.NUnit * HttpContext * Add WebSockets (#1423) * Add WebSockets * Add tests * fix * more tests * Add tests * ... * remove IOwin * - * tests * fluent * ok * match * . * byte[] * x * func * func * byte * trans * ... * frameworks......... * jmes * xxx * sc * using var httpClient = new HttpClient(); * usings * maxRetries * up * xunit v3 * ct * --- * ct * ct2 * T Unit * WireMock.Net.TUnitTests / 10 * t unit first * --project * no tunit * t2 * --project * --project * ci - --project * publish ./test/wiremock-coverage.xml * windows * . * log * ... * log * goed * BodyType * . * . * --scenario * ... * pact * ct * . * WireMock.Net.RestClient.AwesomeAssertions (#1427) * WireMock.Net.RestClient.AwesomeAssertions * ok * atpath * fix test * sonar fixes * ports * proxy test * FIX? * --- * await Task.Delay(100, _ct); * ? * --project * Aspire: use IDistributedApplicationEventingSubscriber (#1428) * broadcast * ok * more tsts * . * Collection * up * . * 2 * remove nfluent * <VersionPrefix>2.0.0-preview-02</VersionPrefix> * ... * . * nuget icon * . * <PackageReference Include="JmesPath.Net" Version="1.1.0" /> * x * 500 * . * fix some warnings * ws
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using HandlebarsDotNet;
|
||||
using HandlebarsDotNet.Helpers;
|
||||
using HandlebarsDotNet.Helpers.Helpers;
|
||||
@@ -24,7 +21,6 @@ internal static class WireMockHandlebarsHelpers
|
||||
GetBaseDirectory(),
|
||||
};
|
||||
|
||||
#if !NETSTANDARD1_3_OR_GREATER
|
||||
void Add(string? path, ICollection<string> customHelperPaths)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
@@ -36,7 +32,7 @@ internal static class WireMockHandlebarsHelpers
|
||||
Add(Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location), paths);
|
||||
Add(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), paths);
|
||||
Add(Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule?.FileName), paths);
|
||||
#endif
|
||||
|
||||
o.CustomHelperPaths = paths;
|
||||
|
||||
o.Categories = settings.HandlebarsSettings?.AllowedHandlebarsHelpers ?? HandlebarsSettings.DefaultAllowedHandlebarsHelpers;
|
||||
@@ -51,7 +47,7 @@ internal static class WireMockHandlebarsHelpers
|
||||
|
||||
private static string GetBaseDirectory()
|
||||
{
|
||||
#if NETSTANDARD1_3_OR_GREATER || NET6_0_OR_GREATER
|
||||
#if NET8_0_OR_GREATER
|
||||
return AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar);
|
||||
#else
|
||||
return AppDomain.CurrentDomain.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System.Collections.Generic;
|
||||
using WireMock.Types;
|
||||
using WireMock.Util;
|
||||
|
||||
|
||||
@@ -1,71 +1,68 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Scriban;
|
||||
using Scriban.Parsing;
|
||||
using Scriban.Runtime;
|
||||
|
||||
namespace WireMock.Transformers.Scriban
|
||||
namespace WireMock.Transformers.Scriban;
|
||||
|
||||
internal class WireMockListAccessor : IListAccessor, IObjectAccessor
|
||||
{
|
||||
internal class WireMockListAccessor : IListAccessor, IObjectAccessor
|
||||
#region IListAccessor
|
||||
public int GetLength(TemplateContext context, SourceSpan span, object target)
|
||||
{
|
||||
#region IListAccessor
|
||||
public int GetLength(TemplateContext context, SourceSpan span, object target)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object GetValue(TemplateContext context, SourceSpan span, object target, int index)
|
||||
{
|
||||
return target.ToString();
|
||||
}
|
||||
|
||||
public void SetValue(TemplateContext context, SourceSpan span, object target, int index, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IObjectAccessor
|
||||
public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TryGetItem(TemplateContext context, SourceSpan span, object target, object index, out object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TrySetItem(TemplateContext context, SourceSpan span, object target, object index, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HasIndexer => throw new NotImplementedException();
|
||||
|
||||
public Type IndexType => throw new NotImplementedException();
|
||||
#endregion
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object GetValue(TemplateContext context, SourceSpan span, object target, int index)
|
||||
{
|
||||
return target?.ToString() ?? string.Empty;
|
||||
}
|
||||
|
||||
public void SetValue(TemplateContext context, SourceSpan span, object target, int index, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IObjectAccessor
|
||||
public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TryGetItem(TemplateContext context, SourceSpan span, object target, object index, out object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TrySetItem(TemplateContext context, SourceSpan span, object target, object index, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HasIndexer => throw new NotImplementedException();
|
||||
|
||||
public Type IndexType => throw new NotImplementedException();
|
||||
#endregion
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using HandlebarsDotNet.Helpers.Models;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System;
|
||||
using WireMock.Settings;
|
||||
using WireMock.Transformers.Handlebars;
|
||||
using WireMock.Transformers.Scriban;
|
||||
|
||||
Reference in New Issue
Block a user