This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum CircuitBreakerState { | |
Unknown = 0, | |
Closed = 1, | |
Open = 2, | |
HalfOpen = 3, | |
} | |
public class JsonClient: IDisposable | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc.Testing; | |
using Newtonsoft.Json; | |
using Shouldly; | |
using System; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Threading.Tasks; | |
using Xunit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
// ref: https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-2.1#aspnet-core-integration-tests | |
namespace xxx | |
{ | |
public class TestStartup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Extensions.DependencyInjection; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
namespace xxx | |
{ | |
public static class ConfigureServicesHandlers | |
{ | |
public static void AddCustomisedMVC(this IServiceCollection services) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Rewrite; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace xxx | |
{ | |
public static class ConfigureAppHandlers | |
{ | |
public static void AddTransportSecurity(this IApplicationBuilder app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace xxx | |
{ | |
public interface IResult | |
{ | |
bool WasSuccessful { get; } | |
bool WasSuccess { get; } | |
string[] Errors { get; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string AsQueryString(this Dictionary<string, string> parameters) | |
{ | |
if (!parameters.Any()) | |
return ""; | |
var builder = new StringBuilder("?"); | |
var separator = ""; | |
foreach (var kvp in parameters.Where(kvp => kvp.Value != null)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
namespace xxx | |
{ | |
public class Startup | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Unosquare.Labs.EmbedIO.Modules | |
{ | |
using Constants; | |
using EmbedIO; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.IO; | |
using System.Linq; | |
using Swan; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Builder, Capabilities, By, until, ThenableWebDriver } from 'selenium-webdriver'; | |
import { expect, should } from 'chai'; | |
should(); // this inits the chai should above up. for some reason | |
import { chaiWebDriver } from 'chai-webdriver'; | |
import { spawn } from 'cross-spawn-async'; | |
import 'mocha'; | |
let iisPath = "C:\\Program Files (x86)\\IIS Express\\iisexpress.exe"; |
NewerOlder