// testing out gists | |
(function(){ | |
var i = 9; | |
i += 3; | |
console.log(i); | |
}()); |
- White-faced heron
- Kingfisher
- Welcome swallow
- Pied stilt
<html> | |
<head></head> | |
<body> | |
Hello | |
</body> | |
</html> |
Unit testing, Integration testing & Dependency Injection with Microsoft .NET Core
We'll walk through the basics of setting up a test projects using dotnet test, and take you through including Microsoft's dependency injection framework and writing Integration test.
Project setup
You'll want to set up three projects - a class library and two test projects like so:
mkdir WeatherConverter
cd WeatherConverter
These are some notes to accompany my talk on continuous deployment for ASP.NET with git. Here you'll find all the tools, commands & setup that I mentioned.
I've tried a bunch of different methods of deploying, and find this to be the simplest, easiest way to set up continuous deploy for ASP.NET while still being powerfull and flexible.
Firstly, I like to ensure I have the following tools installed, to make life on windows a bit less painful:
ScumDB is a tool for managing database changes through your source code version control system.
It's a bit like a migration frame work, however:
- changes are SQL based - you dont need to learn a new syntax
- Database Version numbers are the same as mercurial (or git) revision Ids
- SProc and UDF definitions are checked in just like regular source code functions
function Stop-Vs { | |
$currentApp = Split-Path $pwd -leaf | |
Get-Process -Name devenv | where {$_.mainWindowTitle -like "*$currentApp*"} | Stop-Process | |
} | |
function Start-Vs { | |
$currentApp = Split-Path $pwd -leaf | |
& .\$currentApp.sln | |
} |
function ConvertTo-UnixTimestamp { | |
$epoch = Get-Date -Year 1970 -Month 1 -Day 1 -Hour 0 -Minute 0 -Second 0 | |
$input | % { | |
$milliSeconds = [math]::truncate($_.ToUniversalTime().Subtract($epoch).TotalMilliSeconds) | |
Write-Output $milliSeconds | |
} | |
} | |
Get-Date | ConvertTo-UnixTimestamp |
alert(1); |