-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate VS runner into mspec repo (#539)
- Loading branch information
1 parent
1e575ba
commit b8b67d1
Showing
82 changed files
with
2,992 additions
and
54 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
9 changes: 6 additions & 3 deletions
9
src/Machine.Specifications.Core.Specs/Machine.Specifications.Core.Specs.csproj
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
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
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
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
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
13 changes: 8 additions & 5 deletions
13
...ne.Specifications.Runner.Utility.Specs/Machine.Specifications.Runner.Utility.Specs.csproj
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
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
103 changes: 103 additions & 0 deletions
103
src/Machine.Specifications.Runner.VisualStudio.Fixtures/FixtureCode.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Machine.Specifications; | ||
|
||
namespace SampleSpecs | ||
{ | ||
[Behaviors] | ||
public class SampleBehavior | ||
{ | ||
It sample_behavior_test = () => | ||
true.ShouldBeTrue(); | ||
} | ||
|
||
class BehaviorSampleSpec | ||
{ | ||
Because of = () => { }; | ||
|
||
Behaves_like<SampleBehavior> some_behavior; | ||
} | ||
|
||
class CleanupSpec | ||
{ | ||
static int cleanup_count; | ||
|
||
Because of = () => { }; | ||
|
||
Cleanup after = () => | ||
cleanup_count++; | ||
|
||
It should_not_increment_cleanup = () => | ||
cleanup_count.ShouldEqual(0); | ||
|
||
It should_have_no_cleanups = () => | ||
cleanup_count.ShouldEqual(0); | ||
} | ||
|
||
[AssertDelegate] | ||
public delegate void They(); | ||
|
||
[ActDelegate] | ||
public delegate void WhenDoing(); | ||
|
||
class CustomActAssertDelegateSpec | ||
{ | ||
static string a; | ||
static string b; | ||
|
||
static int resultA; | ||
static int resultB; | ||
|
||
Establish context = () => | ||
{ | ||
a = "foo"; | ||
b = "foo"; | ||
}; | ||
|
||
WhenDoing of = () => | ||
{ | ||
resultA = a.GetHashCode(); | ||
resultB = b.GetHashCode(); | ||
}; | ||
|
||
They should_have_the_same_hash_code = () => resultA.ShouldEqual(resultB); | ||
} | ||
|
||
class Parent | ||
{ | ||
class NestedSpec | ||
{ | ||
It should_remember_that_true_is_true = () => | ||
true.ShouldBeTrue(); | ||
} | ||
} | ||
|
||
class StandardSpec | ||
{ | ||
Because of = () => { }; | ||
|
||
It should_pass = () => | ||
1.ShouldEqual(1); | ||
|
||
[Ignore("reason")] | ||
It should_be_ignored = () => { }; | ||
|
||
It should_fail = () => | ||
1.ShouldEqual(2); | ||
|
||
It unhandled_exception = () => | ||
{ | ||
throw new NotImplementedException(); | ||
}; | ||
|
||
It not_implemented; | ||
} | ||
|
||
class When_something | ||
{ | ||
Because of = () => { }; | ||
|
||
It should_pass = () => | ||
1.ShouldEqual(1); | ||
} | ||
} |
Oops, something went wrong.