Skip to content

Instantly share code, notes, and snippets.

View Steinblock's full-sized avatar

Jürgen Steinblock Steinblock

View GitHub Profile
@Steinblock
Steinblock / Answer.cs
Created November 2, 2015 13:29
Answer
public enum Answers
{
No,
Yes,
}
public struct Answer
{
public Answer(Answers answer)
{
@Steinblock
Steinblock / GenericEqualityComparer.cs
Created November 4, 2015 15:16
GenericEqualityComparer
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace Utils
{
public class GenericEqualityComparer<T> : EqualityComparer<T>
{
@Steinblock
Steinblock / DateTimeExtensions.cs
Created November 26, 2015 09:52
DateTimeExtensions
public static class DateTimeExtensions
{
public static DateTime TrimMilliseconds(this DateTime date)
{
return date.AddMilliseconds(-date.Millisecond);
}
}
[TestClass]
public class DateTimeExtensionsTest
@Steinblock
Steinblock / build.fsx
Last active November 9, 2016 10:55
Example FAKE script to run all test at once
let artifactsDir = "./.ci/artifacts/"
/// modified versions of buildMSTestArgs wich adds testcontainer arguments for multiple assembiles https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/UnitTest/MSTest.fs
let buildMSTestArgs2 parameters (assemblies : string seq) =
// https://msdn.microsoft.com/de-de/library/ms182489.aspx#detail
let detail_errormessage = "errormessage"
let detail_errorstacktrace = "errorstacktrace"
let detail_duration = "duration"