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 class Different | |
{ | |
private ISomething something; | |
public Different(ISomethingProvider somethingProvider) | |
{ | |
this.something = somethingProvider.Provide(); | |
} | |
} |
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
[Scenario] | |
public static void GettingACollection | |
{ | |
var provider = default(CollectionProvider); | |
var collection = default(Collection); | |
"Given a collection provider" | |
.Given(() => provider = new CollectionProvider()); | |
"When getting a collection" |
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 class RuntimeFeature | |
{ | |
[Scenario] | |
public void ApplyDependentCalculation() | |
{ | |
int _left1; | |
int _right1; | |
int _left2; | |
Variable _outputVariable1; | |
Variable _outputVariable2; |
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
[Background] | |
public static void Background(out Stack<int> stack) | |
{ | |
"Given a stack" | |
.Given(() => stack = new Stack<int>()); | |
} | |
[Scenario] | |
[Example(123)] | |
[Example(234)] |
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 class IntervalFeature | |
{ | |
[Scenario] | |
public void ComparisonUsingLinq() | |
{ | |
var result = | |
from left in "Given an interval".Of(Interval.WholeStep) | |
from right in "And a smaller interval".Of(Interval.HalfStep) | |
select "When comparing the intervals".Do(left.CompareTo(right)); |
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
Hi, | |
In my github pages site I have some code which generates excerpts from posts https://github.com/adamralph/adamralph.github.com/blob/master/index.html#L13 | |
This worked on 6th Jan, which was the last time I pushed a change before today. | |
However, after pushing an unrelated change today, the code has stopped working. Instead of an excerpt, the entire post is shown - see http://www.adamralph.com/ | |
Another user has also reported the same problem with his site and has temporarily removed his excerpts code, the diff is at https://github.com/alfhenrik/henri.kandersson.com/commit/b60804d36e203f14af312e08f4c2e5b566cc9fc8#L0L15 |
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
[Scenario] | |
[Example(typeof(int), 0)] | |
[Example(typeof(object), null)] | |
public static void GeneratedDefaultValue<TValue> | |
(Type type, TValue expectedValue, Argument argument) | |
{ | |
"Given the type {0}" | |
.Given(() => { }); | |
"When constructing an argument using the type" |
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
[Scenario] | |
public void PushingAnElementOntoAStack() // No parameters :-D | |
{ | |
"Given an element" | |
.Given(scenario => scenario.Element = 11); | |
"And a stack" | |
.And(scenario => scenario.Stack = new Stack<int>()); | |
"When pushing the element onto the stack" |
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
Errors and Failures: | |
1) Test Error : FakeItEasy.IntegrationTests.ConfigurationTests.Should_be_able_to_configure_indexed_properties | |
FakeItEasy.Core.FakeCreationException : | |
Failed to create fake of type "FakeItEasy.IntegrationTests.ConfigurationTests+IIndexed". | |
Below is a list of reasons for failure per attempted constructor: | |
No constructor arguments failed: | |
No default constructor was found on the type FakeItEasy.IntegrationTests.ConfigurationTests+IIndexed. | |
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
[Test] | |
public void Should_match_lambda_arguments() | |
{ | |
// Arrange | |
var fake = A.Fake<ITypeWithMethodWithDelegateParameter>(); | |
var action = (Action)(() => { }); | |
var other = (Action)(() => { }); | |
// Act | |
fake.Foo(action); |
OlderNewer