onsdag 24 oktober 2018

Sökväg för testfiler

var basepath = TestContext.CurrentContext.TestDirectory;

torsdag 24 maj 2018

Mongo Select

Exitst
{"identifier": { $exists: true }}

Contains
{ "identifier": /.*name.*/I }
{ "identifier" : { $regex : /Name/i } }

Starts with
{ "identifier": /^true.*/I }

Ends with
{ "identifier": /.*true$/I }

Equal (== 1)
{ "identifier": "1" }

Not equal (!=1)
{ "identifier": { $ne: "1" } }

In
{ "identifier": { $in: [1,2] } }

Not in
{ "identifier": { $nin: [1,2] } }

All
{ "identifier": { $all: [1] } }

More than
{ "identifier": { $gt: 1 } }

More than or equal
{ "identifier": { $gte: 1 } }

More than… less than …
{ "identifier": { $gte: 1, $lte: 2 } }

torsdag 8 februari 2018

Regex

https://regexr.com/

Enum till string

string text = Enum.GetName(typeof(enumType), value)

tisdag 16 januari 2018

#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs1591