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.Text.RegularExpressions; | |
using Amazon.Route53; | |
using Amazon.Route53.Model; | |
var route53AccessKey = Environment.GetEnvironmentVariable("..."); | |
var route53SecretKey = Environment.GetEnvironmentVariable("..."); | |
var route53ZoneId = Environment.GetEnvironmentVariable("..."); | |
var meeowNowAddressPattern = Environment.GetEnvironmentVariable("...")!; | |
var client = new AmazonRoute53Client(); |
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 logging | |
logger = logging.getLogger() | |
ch = logging.StreamHandler() | |
formatter = logging.Formatter(fmt='%(asctime)s.%(msecs)03dZ - %(msg)s', datefmt='%Y-%m-%dT%H:%M:%S') | |
ch.setFormatter(formatter) | |
logger.addHandler(ch) | |
logger.warning("some message") |
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
private static void RegisterBusinessLogicStubs(ContainerBuilder containerBuilder) | |
{ | |
var tempContainer = CreateBusinessLogicAutofacModuleContainer(); | |
var interfaceToStubList = GetInterfaceTypeList(tempContainer); | |
var stubList = interfaceToStubList.Select(x => Substitute.For(new[] { x }, new object[] { })); | |
foreach (var s in stubList) | |
containerBuilder.RegisterInstance(s).AsImplementedInterfaces(); | |
} |
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
private static void RegisterBusinessLogicStubs(ContainerBuilder containerBuilder) | |
{ | |
var tempContainerBuilder = new ContainerBuilder(); | |
var module = BusinessLogicAutofacModule.CreateWithoutDatabaseDefaults(default, default, default, default, default, default, default, default); | |
containerBuilder.RegisterModule(module); | |
var tempContainer = tempContainerBuilder.Build(); | |
var interfaceToStubList = tempContainer.ComponentRegistry.Registrations | |
.SelectMany(x => x.Services) | |
.OfType<IServiceWithType>() |
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 Jwc.MoqExtensions | |
{ | |
using Moq; | |
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using Xunit; | |
public interface IFoo |