-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from midripps/vb
Fix for #69 NSpec and VB.NET
- Loading branch information
Showing
15 changed files
with
580 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Imports NSpec | ||
Imports NUnit.Framework | ||
Imports NSpecSpecs | ||
Imports NSpecSpecs.WhenRunningSpecs | ||
|
||
Namespace WhenRunningSpecs | ||
|
||
<TestFixture()> | ||
<Category("RunningSpecs")> | ||
Public Class DescribeExample | ||
Inherits when_running_specs | ||
|
||
Public Class SpecClass | ||
Inherits NSpec.nspec | ||
|
||
Sub It_Changes_Status_After_Run() | ||
|
||
End Sub | ||
|
||
Sub It_Passes() | ||
|
||
End Sub | ||
|
||
Sub It_Fails() | ||
Throw New Exception() | ||
End Sub | ||
End Class | ||
|
||
<Test()> | ||
Sub Execution_Status_Changes_After_Run() | ||
Run(GetType(SpecClass)) | ||
|
||
Dim ex = TheExample("It Changes Status After Run") | ||
|
||
ex.HasRun.should_be_true() | ||
End Sub | ||
|
||
<Test()> | ||
Sub Passing_Status_Is_Passed_When_It_Succeeds() | ||
Run(GetType(SpecClass)) | ||
|
||
TheExample("It Passes").should_have_passed() | ||
End Sub | ||
|
||
<Test()> | ||
Sub Passing_Status_Is_Not_Passed_When_It_Fails() | ||
Run(GetType(SpecClass)) | ||
|
||
TheExample("It Fails").should_have_failed() | ||
End Sub | ||
|
||
Public Class SpecClassWithAnonymousLambdas | ||
Inherits NSpec.nspec | ||
|
||
Sub Describe_Specs_In_VB_With_Anonymous_Lambdas() | ||
context("Some context with an anonymous Lambda") = | ||
Sub() | ||
it("has an anonymous lambda") = Sub() | ||
End Sub | ||
End Sub | ||
End Sub | ||
End Class | ||
|
||
<Test()> | ||
Sub Finds_And_Runs_Three_Class_Level_Examples() | ||
Run(GetType(SpecClass)) | ||
|
||
TheExampleCount().should_be(3) | ||
End Sub | ||
|
||
<Test()> | ||
Sub Finds_Only_One_Example_Ignoring_Anonymous_Lambdas() | ||
Run(GetType(SpecClassWithAnonymousLambdas)) | ||
|
||
TheExampleCount().should_be(1) | ||
End Sub | ||
|
||
End Class | ||
|
||
End Namespace | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<MySubMain>false</MySubMain> | ||
<SingleInstance>false</SingleInstance> | ||
<ShutdownMode>0</ShutdownMode> | ||
<EnableVisualStyles>true</EnableVisualStyles> | ||
<AuthenticationMode>0</AuthenticationMode> | ||
<ApplicationType>1</ApplicationType> | ||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit> | ||
</MyApplicationData> |
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,35 @@ | ||
Imports System | ||
Imports System.Reflection | ||
Imports System.Runtime.InteropServices | ||
|
||
' General Information about an assembly is controlled through the following | ||
' set of attributes. Change these attribute values to modify the information | ||
' associated with an assembly. | ||
|
||
' Review the values of the assembly attributes | ||
|
||
<Assembly: AssemblyTitle("NSpecSpecsVB")> | ||
<Assembly: AssemblyDescription("")> | ||
<Assembly: AssemblyCompany("Microsoft")> | ||
<Assembly: AssemblyProduct("NSpecSpecsVB")> | ||
<Assembly: AssemblyCopyright("Copyright © Microsoft 2014")> | ||
<Assembly: AssemblyTrademark("")> | ||
|
||
<Assembly: ComVisible(False)> | ||
|
||
'The following GUID is for the ID of the typelib if this project is exposed to COM | ||
<Assembly: Guid("3e299a57-cabc-41b4-80bd-79cc64f45bc1")> | ||
|
||
' Version information for an assembly consists of the following four values: | ||
' | ||
' Major Version | ||
' Minor Version | ||
' Build Number | ||
' Revision | ||
' | ||
' You can specify all the values or you can default the Build and Revision Numbers | ||
' by using the '*' as shown below: | ||
' <Assembly: AssemblyVersion("1.0.*")> | ||
|
||
<Assembly: AssemblyVersion("1.0.0.0")> | ||
<Assembly: AssemblyFileVersion("1.0.0.0")> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.