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
// The verification is as follows: | |
Execute.Verification | |
.ForCondition(elementsWithCorrectValue.Any) | |
.FailWith(string.Concat(Message, " with name {2} and value {3}"), assertions.Subject, elementName, name, elementValue); | |
// The error message with 1.7.1.1 is: | |
Expected collection | |
{<Field Name=\"fieldName\">...</Field>} | |
to contain a "Field" element with name "fieldName" and value "before\r\nafter" |
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
System.IO.FileNotFoundException | |
Could not load file or assembly 'JetBrains.ReSharper.Psi, Version=7.0.58.117, Culture=neutral, PublicKeyToken=1010a0d8d6380325' or one of its dependencies. The system cannot find the file specified. | |
The stacktrace: | |
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) | |
at System.Reflection.RuntimeAssembly.GetExportedTypes() | |
at FluentAssertions.Formatting.AttributeBasedFormatter.GetExportedTypes(Assembly assembly) in c:\Workspaces\codeplex05\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs: line 125 | |
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext() | |
at System.Linq.Buffer`1..ctor(IEnumerable`1 source) |
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
namespace SearchPattern | |
{ | |
using NUnit.Framework; | |
[TestFixture] | |
public class SearchPatternFakeTest | |
{ | |
private Worker testee; | |
[SetUp] |
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
Deploying Server 4.6.317 to: Server Sanity Testing (Guided Failure: Not Enabled) | |
[13:05:59]Error from Octopus server (HTTP 403): You do not have permission to perform this action. Please contact your Octopus administrator. | |
[13:05:59]Exit code: -7 | |
[13:05:59]Octo.exe exit code: -7 |
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 Test | |
{ | |
[Fact] | |
public void MapChildViewModel() | |
{ | |
Mapper.CreateMap<ViewModel, Dto>(); | |
var childViewModel = new ChildViewModel | |
{ | |
ChildId = 5, |
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
function Tfs-UpdateFeature { | |
[CmdletBinding()] | |
param () | |
DynamicParam { | |
$RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary | |
$FeatureParameter = New-DynamicParameter -ParameterName "Feature" -AllowedValues {(git branch --list) | ForEach-Object { $_.Substring(2) }} -Position 0 -Aliases @("b","f") -Mandatory | |
$BranchParameter = New-DynamicParameter -ParameterName "MainBranch" -AllowedValues {(git branch --list) | ForEach-Object { $_.Substring(2) }} -Position 1 | |
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
The expression in the code looks like this: | |
var list = new List<string>(); | |
Assert.AreEqual(3, list.Count); | |
Search part of ssp: | |
Assert.AreEqual($expected$, $actual$.Count); | |
both variables match "exactly one argument". I've turned on "Match similar constructs" | |
Replace part of ssp: |
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 MyCollectionAssertionExtensions | |
{ | |
public static AndConstraint<StringCollectionAssertions> ContainMagic(this StringCollectionAssertions assertions) | |
{ | |
Execute.Assertion | |
.ForCondition(assertions.Subject.As<MyType>().ContainsMagicString()) | |
.FailWith("No, there's no magic"); | |
return new AndConstraint<StringCollectionAssertions>(assertions); | |
} |
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
// I would like to make sure, both exceptions are packed into the AggregateException | |
[TestMethod] | |
public void ShouldThrowAggregateException() | |
{ | |
Action act = () => | |
{ | |
throw new AggregateException(new Exception(), new ArgumentException()); | |
}; | |
act.ShouldThrow<AggregateException>() |
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 JsonTextDeserializerOnly : ISerialize | |
{ | |
public void Serialize<T>(Stream output, T graph) | |
{ | |
throw new NotSupportedException("serialization should not be required"); | |
} | |
public T Deserialize<T>(Stream input) | |
{ | |
if (typeof(T) == typeof(List<EventMessage>)) |
OlderNewer