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
#!/bin/bash | |
ELASTICSEARCH_VERSION=1.7 | |
### Download and install the Public Signing Key | |
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
### Setup Repository | |
echo "deb http://packages.elastic.co/elasticsearch/${ELASTICSEARCH_VERSION}/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elk.list |
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 class AssertExtensions | |
{ | |
public static async Task ThrowsAsync<TException>(Func<Task> func) where TException : Exception | |
{ | |
var expected = typeof(TException); | |
Type actual = null; | |
try | |
{ | |
await func(); |
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 class MoqExtensions | |
{ | |
public static void ReturnsInOrder<T, TResult>(this ISetup<T, TResult> setup, | |
params object[] results) where T : class { | |
var queue = new Queue(results); | |
setup.Returns(() => { | |
var result = queue.Dequeue(); | |
if (result is Exception) { | |
throw result as Exception; | |
} |