Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can also make a unit test project that works in Delta Shell. To do so, install the DeltaShell.TestProject package into your test project. Take notice of the Default Project in the Package Manager Console, because you want the DeltaShell.TestProject to be in your test project and not in your application plugin project.

Auto-Restore Packages

You don't have to add the packages folder to svn, because TeamCity and Visual Studio already know how to handle and download the packages.

You may right click on your solution in visual studio and click Enable auto restore NuGet packages. This will add some files and a folder to your solution. From now on, the packages will be downloaded automatically when missing before compilation.

Creating an ApplicationPlugin derivative

...

Info

Always take notice that your plugin folder only contains the dlls you expect. And always take notice that $(SolutionDir)bin\$(Configuration) only contains test dlls and test utils dlls.

Unit Test Data

Your unit test project is actually already set up correctly when you have followed the steps explained above. There is just one last thing when you want to add test data. We don't want to copy over the unit test data every time we are going to compile the project. So what can you do to avoid that? Add your test data in a folder next to the testcsproj called test-data. A post-build event has been added to your testcsproj when you installed DeltaShell.TestProject. This post-build event creates a symbolic link to your test-data folder and you can access it via TestHelper.GetDataDir().

Setting up TeamCity

We have already set up a couple of templates in teamcity for you to automatically let your unit tests run and let your installers create what it needs to.

Run Product Tests

Make a new TeamCity configuration and make it based on the template for unit tests. Fill in the name of your sln file in product_sln_file. You may exclude or include some categories if you want.

Warning

Make sure your csproj ends with Tests. This is because the TeamCity template is only looking for dlls that end with *Tests.dll

Run Product Tests Updated Trunk

Is almost the same as Run Product Tests, but also updates to the latest trunk version of the nuget packages. This can be convenient for framework developers to see if anything breaks with their changes.

Build Solution (Release)

Just builds the solution and returns a zip as artifact that can be downloaded. Actually uses a .proj file to run MSBuild. You will have to add a .proj file next to your solution in order to make this work.

TODO: Elaborate on the .proj file.

Build MSI via MSBuild

This template actually requires one more thing at the moment. The product must be in the svn of the trunk in order to find it. The split of the setup has not yet been done completely and is still under construction.

TODO: Elaborate on making wix