Make property assignment an Action
<p>Just an example: I have a class that reacts to set properties. More specifically, there are three properties from which an assembly is loaded once they are all set. Afterwards an event is triggered.</p>

<p>My unit test for this behavior look something like this:</p>

<pre><code>bool assemblyLoaded = false;
loader.AssemblyLoaded += () =&gt; assemblyLoaded = true;
loader.Type = "someType";

Assert.IsFalse(assemblyLoaded); // not loaded, only one property was set
</code></pre>

<p>This would lead to three unit tests, one test for each property. So I'd like to abstract the test by using a helping method (see below) to avoid code replication:</p>

<pre><code>private void Testfoobar(Action setProperty)
{
    bool assemblyLoaded = false;
    loader.AssemblyLoaded += (sender, args) =&gt; assemblyLoaded = true;
    setProperty();
}
</code></pre>

<p>Unfortunately, I cannot make a property assignment an Action.</p>

<p>So, I wonder, can you somehow "transform" the assignment to Action? Or is there maybe a different way to abstract the code?</p>
