Closed kdorsel closed 4 years ago
Hey kdorsel,
Thanks you very much for the PR. I'll have look at it tomorrow.
Roald
Can you also add some tests to the TcBlackTests project in
ObjectDefinitionTests.cs
? Perhaps best to collect the tests in a new method, something likeAbstractAndFinalModifiersForMethodsAndFunctionBlocks
I'll create a test suite for these.
I'm having troubles with loading the test project with this error:
C:\Users\kdorsel\Documents\github\TcBlack\src\TcBlackTests\TcBlackTests.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. C:\Users\kdorsel\Documents\github\TcBlack\src\TcBlackTests\TcBlackTests.csproj
Comparing the TcBlack and TcBlackTests csproj they are completely different. I'm using VS2015.
I haven't tried to run the project with VS2015. In the contributing https://github.com/Roald87/TcBlack/blob/master/CONTRIBUTING.md#use-a-consistent-coding-style document I recommend to use VS2017. Is that an issue for you?
The fact that they are so different is an artifact from the past. I initially stared the project using .NET Core. Later I converted to the .NET Framework. Apparently I didn't convert the unit test project.
I'll have a look if I can convert the unit test project as well.
I need VS2015 since TC3 Database Server doesn't work on VS2017 yet. I can get VS2017 also, but beside that file I haven't had any issues.
Ok let me try to change it. As long as you don't upload the .csproj
file maybe it'll be fine.
Does the test in this branch run?
https://github.com/Roald87/TcBlack/tree/xunit-in-net-framework
The UnitTestDotNetFramework project loads and I can access it. But when I Run All Tests I get no results and it looks like no tests are run.
I'll look more into it. I'll also get VS2017 and try and report back.
https://xunit.net/docs/getting-started/netfx/visual-studio https://stackoverflow.com/questions/44573009/does-xunit-runner-visualstudio-not-work-for-visual-studio
Is was some option under Tests > General I believe which you have to disable. It was something with optimization blabla. You should turn that off, then it worked for me.
In VS2017, everything works fine from the main branch (TcBlackTests). I'll work on adding the tests now for this.
Sorry for adding the extra work! The xunit-in-net-framework branch is no longer needed.
No problem. I didn't want to scare away the first contributor 😛 .
Updated with tests and also closes #36 now.
Thank you very much for your contribution!
Fix for abstract and final access modifiers for FB and methods Fixes #32 #36