Neither [nsubstitute][1] nor [moq][0] can mock internal virtual methods by default. Help them help you. Add this to the csproj of your main assembly:
<ItemGroup>
#!/bin/sh | |
SELF=${0##*/} | |
die() { | |
log "$@" | |
exit 1 | |
} | |
log() { |
#!/bin/sh | |
SELF=${0##*/} | |
die() { | |
log "$@" | |
exit 1 | |
} | |
log() { |
#!/bin/sh | |
cat << EOD | |
Format/result | Command | Output | |
--------------------------------+----------------------------+------------------------------ | |
YYYY-MM-DD_hh:mm:ss | date +%F_%T | $(date +%F_%T) | |
YYYYMMDD_hhmmss | date +%Y%m%d_%H%M%S | $(date +%Y%m%d_%H%M%S) | |
YYYYMMDD_hhmmss (UTC version) | date --utc +%Y%m%d_%H%M%SZ | $(date --utc +%Y%m%d_%H%M%SZ) | |
YYYYMMDD_hhmmss (UTC version) | date -u +%Y%m%d_%H%M%SZ | $(date -u +%Y%m%d_%H%M%SZ) | |
YYYYMMDD_hhmmss (with local TZ) | date +%Y%m%d_%H%M%S%Z | $(date +%Y%m%d_%H%M%S%Z) |
#!/bin/sh | |
SELF=${0##*/} | |
CONTAINER="postgres:10-alpine" | |
die() { | |
log "$@" | |
exit 1 | |
} |
#!/bin/sh | |
die() { | |
log "$@" | |
exit 1 | |
} | |
log() { | |
printf "$SELF: %s\n" "$@" >&2 | |
} |
version: "3.3" | |
okayHttpServer: | |
image: busybox | |
ports: [ "8080:8080" ] | |
command: "sh -c \"while true; do echo -n -e 'HTTP/1.1 200 OK\n\n🎉' | nc -p 8080 -l ; done\"" |
#!/bin/sh | |
pid='' | |
exec node $* & | |
pid=$! | |
printf "started $1, $pid\n" | |
fswatch --one-per-batch --latency 1 --recursive --exclude '.*' --include '\.js$' . | while read event; do |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Threading.Tasks; | |
using DnsClient; | |
namespace | |
{ | |
public class DnsSrvClient |
#!/bin/sh | |
repo="d3sw/falkor" | |
token=${GITHUB_TOKEN:?} | |
localref=${1:-HEAD} | |
remoteBranch=${2:-jacobstaging} | |
merge() { | |
http \ |