<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Howto</title><link>https://forge.codesys.com/tol/ap-unittest/wiki/Howto/</link><description>Recent changes to Howto</description><language>en</language><lastBuildDate>Wed, 08 May 2019 11:30:21 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/tol/ap-unittest/wiki/Howto/feed" rel="self" type="application/rss+xml"></atom:link><item><title>Discussion for Howto page</title><link>https://forge.codesys.com/tol/ap-unittest/wiki/Howto/?limit=250#eea2</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This explanation is rather hard to find via &lt;a class="alink" href="/tol/ap-unittest/home/Home/"&gt;[Home]&lt;/a&gt;, could you fix that?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Wed, 08 May 2019 11:30:21 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com1b2dcb373f510ffe585b67b934b73a37de463aa1</guid></item><item><title>Howto modified by kevin</title><link>https://forge.codesys.com/tol/ap-unittest/wiki/Howto/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,7 +1,18 @@
-Welcome to your wiki!
-
-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
-
-The wiki uses [Markdown](/tol/ap-unittest/wiki/markdown_syntax/) syntax.
-
-[[members limit=20]]
+# For whom is it?
+Customers who have purchased Automation Platform and who develop their own plug-ins for the CODESYS development system.
+# What is it?
+Automation Platform uses its own proprietary implementation for dependency injection, and it turns out to be rather hard to develop unit tests for plug-ins which require external dependencies.
+Therefore the APUnitTestFramework is a software component which mimics the CODESYS environment during the runtime of a unit test, and which enables resetting the environment to its initial state (which is not a feature in the _real_ Automation Platform at all, for various reasons).
+# How to build it?
+You must adapt the references in the solution and the csproj files to your individual installation of the Automation Platform SDK, as well as the postbuild step. After that, building and installing the APUnitTestFramework.plugin.dll should be no problem for experienced Automation Platform developers.
+# How to use it?
+- Instantiate the Testbed class (preferably  in a using-statement, as it requires disposal at the end of the test).
+- If you require entire plug-ins as dependencies for your testee plug-in, use the IncludeAdditionalPlugInGuid method (not recommended at all, as it contradicts the sense of a unit test).
+- If you require mocks for dependencies for your testee plug-in, use the AddMock methods. The parameters are mainly the TypeGuid to be mocked, and a factory method to create the mock instance on demand. Take care of the boolean systemInstance parameter as well.
+- Initialize the testbed. This is the same as starting up a CODESYS instance with the specified dependencies. You do not need to prepare any version profiles; this is done automagically by the APUnitTestFramework.
+- Do your tests.
+- Dispose the testbed (if not used in a using-statement).
+# Notes
+- APUnitTestFramework only works for dependencies which are declared using our own Dependency Injection mechanisms. For older plug-ins which are using the legacy ComponentManager calls, this framework will not be useful at all.
+- If your tests fail due to unresolved references, you can attach to the Testbed's DependencyError event to find out details.
+- We do not actively support this framework as a product. It works in-house in a couple of ways, so we are fine with the current state. If it does not work for you (remember: many Automation Platform customers have quite customized environments), then we cannot help. Feel free to dive into the code by yourself; there's a lot to learn about the internal workings of the Automation Platform.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kevin</dc:creator><pubDate>Tue, 12 Mar 2019 13:08:06 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com078f51a181c0603dc716ba5c843ea6beefdaeff3</guid></item><item><title>Home modified by kevin</title><link>https://forge.codesys.com/tol/ap-unittest/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/tol/ap-unittest/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;h6&gt;Project Members:&lt;/h6&gt;
	&lt;ul class="md-users-list"&gt;
		&lt;li&gt;&lt;a href="/u/kevin/"&gt;kevin&lt;/a&gt; (admin)&lt;/li&gt;
		
	&lt;/ul&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kevin</dc:creator><pubDate>Tue, 12 Mar 2019 12:49:28 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.coma583bde7b2dda358df6a6345dfcc766a52c02d1b</guid></item></channel></rss>