This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | |
<description>@description@</description> | |
<id>@project@</id> | |
<version>@build.number@</version> | |
<authors>@authors@</authors> | |
<owners>@authors@</owners> | |
<language>en-US</language> | |
<summary>@summary@</summary> |
This file contains hidden or 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
Target "BuildNuGet" (fun _ -> | |
let nugetDocsDir = nugetDir @@ "docs/" | |
let nugetLibDir = nugetDir @@ "lib/" | |
let nugetContentDir = nugetDir @@ "Content/" | |
XCopy docsDir nugetDocsDir | |
XCopy buildDir nugetLibDir | |
XCopy nugetContentSourceDir nugetContentDir | |
NuGet (fun p -> |
This file contains hidden or 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
Target "Test" (fun () -> | |
!+ (testDir + @"\*Tests.dll") | |
|> Scan | |
|> MSpec (fun p -> | |
{p with | |
ExcludeTags = ["Selenium"] | |
HtmlOutputDir = testOutputDir}) | |
) |
This file contains hidden or 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 class Math | |
{ | |
public static int Fac(int x) | |
{ | |
if (x <= 1) | |
return 1; | |
return Fac(x - 1)*x; | |
} | |
} |
This file contains hidden or 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 abstract class when_mapping_to_another_type_and_back<T, S> | |
{ | |
protected static T Model; | |
protected static T Mapped; | |
Because of = () => Mapped = Model.MapTo<S>().MapTo<T>(); | |
protected static void VerifyAllProperties() | |
{ | |
foreach (var property in typeof (T).GetProperties()) |
This file contains hidden or 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
[Subject(typeof (AcqRequestHeader))] | |
public class When_creating_call_order_with_frame_contract : when_logged_in | |
{ | |
Because of = | |
() => FluentSelenium<AcqRequestHeaderViewModel>() | |
.GoToUrl("AcqRequestHeader/Create") | |
.SelectValueFrom(x => x.Record_Type, "Abrufauftrag") | |
.TypeTextInFor(x => x.Frame_Contract_No, "12345"); | |
It should_not_display_an_error_message = |
This file contains hidden or 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 class Given_the_current_day_is_monday_when_identifying_my_mood : WithSubject<MoodIdentifier> | |
{ | |
static string _mood; | |
Establish context = () => With(new CurrentTime(new DateTime(2011, 2, 14))); | |
Because of = () => _mood = Subject.IdentifyMood(); | |
It should_be_pretty_bad = () => _mood.ShouldEqual("Pretty bad"); | |
} |
This file contains hidden or 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 FSharpRecordExtensions | |
{ | |
public static string GetPropertyName<T, TProperty>(this Expression<Func<T, TProperty>> expression) | |
{ | |
return ((MemberExpression) expression.Body).Member.Name; | |
} | |
public static Tuple<T, FieldInfo> Set<T, S>(this T target, Expression<Func<T, S>> expression) | |
{ | |
var propertyName = expression.GetPropertyName(); |
This file contains hidden or 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 class SdkClass | |
{ | |
public int GetInfo(string param1, out string outParam) | |
{ | |
// ... | |
var errorCode = 1; | |
outParam = "MyInfo"; | |
return errorCode; | |
} | |
} |
This file contains hidden or 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
// you can do this even with BigInteger | |
static IEnumerable<long> AllNumbers() | |
{ | |
var x = 0; | |
while (true) | |
yield return x++; | |
} | |
static IEnumerable<long> AllEvenNumbers() | |
{ |