Search

Search:

Namespace:

Search Result
.

my mp3 collection, <a href="http://pedrrosso.isuisse.com/what-is-a-condenser-boiler.html">What Is A Condenser Boiler</a>, [url="http://pedrrosso.isuisse.com/what-is-a-condenser-boiler.html"]What Is A Condenser Boiler[/url], http://pedrrosso.isuisse.com/what-is-a-condenser-boiler.html What Is A Condenser Boiler, 2862, <a href="http://bellona.isuisse.com/what-is-a-knock-sensor.html">What Is A Knock Sensor</a>, [url="http://bellona.isuisse.com/what-is-a-knock-sensor.html"]What Is A Knock Sensor[/url], http://bellona.isuisse.com/what-is-a-knock-sensor.html What Is A Knock Sensor, , <a href="http://verronique.isuisse.com/what-is-a-basic-day-in-training.html">What Is A Basic Day In Training</a>, [url="http://verronique.isuisse.com/what-is-a-basic-day-in-training.html"]What Is A Basic Day In Training[/url], http://verronique.isuisse.com/what-is-a-basic-day-in-training.html What Is A Basic Day In Training, fnai, <a href="http://valdemadera.isuisse.com/what-is-a-kpi.html">What Is A Kpi</a>, [url="http://valdemadera.isuisse.com/what-is-a-kpi.html"]What Is A Kpi[/url], http://valdemadera.isuisse.com/what-is-a-kpi.html What Is A Kpi, 718, <a href="http://chaccon.isuisse.com/what-is-a-full-service.html">What Is A Full Service</a>, [url="http://chaccon.isuisse.com/what-is-a-full-service.html"]What Is A Full Service[/url], http://chaccon.isuisse.com/what-is-a-full-service.html What Is A Full Service, xojpu, <a href="http://bellona.isuisse.com/what-is-a-fistula.html">What Is A Fistula</a>, [url="http://bellona.isuisse.com/what-is-a-fistula.html"]What Is A Fistula[/url], http://bellona.isuisse.com/what-is-a-fistula.html What Is A Fistula, 8))), <a href="http://trevvino.isuisse.com/what-is-a-clock-generator.html">What Is A Clock Generator</a>, [url="http://trevvino.isuisse.com/what-is-a-clock-generator.html"]What Is A Clock Generator[/url], http://trevvino.isuisse.com/what-is-a-clock-generator.html What Is A Clock Generator, 49131, <a href="http://eussebio.isuisse.com/what-is-a-characteristic-of-longitudinal-instability.html">What Is A Characteristic Of Longitudinal Instability</a>, [url="http://eussebio.isuisse.com/what-is-a-characteristic-of-longitudinal-instability.html"]What Is A Characteristic Of Longitudinal Instability[/url], http://eussebio.isuisse.com/what-is-a-characteristic-of-longitudinal-instability.html What Is A Characteristic Of Longitudinal Instability, PP, <a href="http://rivvera.isuisse.com/what-is-a-narcisist.html">What Is A Narcisist</a>, [url="http://rivvera.isuisse.com/what-is-a-narcisist.html"]What Is A Narcisist[/url], http://rivvera.isuisse.com/what-is-a-narcisist.html What Is A Narcisist, >((, <a href="http://bellona.isuisse.com/what-is-a-hostile-workplace.html">What Is A Hostile Workplace</a>, [url="http://bellona.isuisse.com/what-is-a-hostile-workplace.html"]What Is A Hostile Workplace[/url], http://bellona.isuisse.com/what-is-a-hostile-workplace.html What Is A Hostile Workplace, >:DD, <a href="http://eussebio.isuisse.com/what-is-a-credit.html">What Is A Credit</a>, [url="http://eussebio.isuisse.com/what-is-a-credit.html"]What Is A Credit[/url], http://eussebio.isuisse.com/what-is-a-credit.html What Is A Credit, dup, <a href="http://verronique.isuisse.com/what-is-a-bear-market.html">What Is A Bear Market</a>, [url="http://verronique.isuisse.com/what-is-a-bear-market.html"]What Is A Bear Market[/url], http://verronique.isuisse.com/what-is-a-bear-market.html What Is A Bear Market, :DDD, <a href="http://saennz.isuisse.com/what-inuyasha-character-will-you-marry.html">What Inuyasha Character Will You Marry</a>, [url="http://saennz.isuisse.com/what-inuyasha-character-will-you-marry.html"]What Inuyasha Character Will You Marry[/url], http://saennz.isuisse.com/what-inuyasha-character-will-you-marry.html What Inuyasha Character Will You Marry, =OO, <a href="http://bellona.isuisse.com/what-is-a-good-bicep-workout.html">What Is A Good Bicep Workout</a>, [url="http://bellona.isuisse.com/what-is-a-good-bicep-workout.html"]What Is A Good Bicep Workout[/url], http://bellona.isuisse.com/what-is-a-good-bicep-workout.html What Is A Good Bicep Workout, 93610, <a href="http://valdemadera.isuisse.com/what-is-a-denial-of-service-attack.html">What Is A Denial Of Service Attack</a>, [url="http://valdemadera.isuisse.com/what-is-a-denial-of-service-attack.html"]What Is A Denial Of Service Attack[/url], http://valdemadera.isuisse.com/what-is-a-denial-of-service-attack.html What Is A Denial Of Service Attack, xpfxn, <a href="http://verronique.isuisse.com/what-i-learned-from.html">What I Learned From</a>, [url="http://verronique.isuisse.com/what-i-learned-from.html"]What I Learned From[/url], http://verronique.isuisse.com/what-i-learned-from.html What I Learned From, =-PPP, <a href="http://saennz.isuisse.com/what-if-jesus-had-never-been-born.html">What If Jesus Had Never Been Born</a>, [url="http://saennz.isuisse.com/what-if-jesus-had-never-been-born.html"]What If Jesus Had Never Been Born[/url], http://saennz.isuisse.com/what-if-jesus-had-never-been-born.html What If Jesus Had Never Been Born, 456688, <a href="http://perralta.isuisse.com/what-is-a-megger-test.html">What Is A Megger Test</a>, [url="http://perralta.isuisse.com/what-is-a-megger-test.html"]What Is A Megger Test[/url], http://perralta.isuisse.com/what-is-a-megger-test.html What Is A Megger Test, qevy, <a href="http://valdemadera.isuisse.com/what-is-a-disadvantage-of-cut-through-switching.html">What Is A Disadvantage Of Cut Through Switching</a>, [url="http://valdemadera.isuisse.com/what-is-a-disadvantage-of-cut-through-switching.html"]What Is A Disadvantage Of Cut Through Switching[/url], http://valdemadera.isuisse.com/what-is-a-disadvantage-of-cut-through-switching.html What Is A Disadvantage Of Cut Through Switching, 8-[[, <a href="http://saennz.isuisse.com/what-is-a-barebones-kit.html">What Is A Barebones Kit</a>, [url="http://saennz.isuisse.com/what-is-a-barebones-kit.html"]What Is A Barebones Kit[/url], http://saennz.isuisse.com/what-is-a-barebones-kit.html What Is A Barebones Kit, %-P, <a href="http://pedrrosso.isuisse.com/what-is-a-business-partner.html">What Is A Business Partner</a>, [url="http://pedrrosso.isuisse.com/what-is-a-business-partner.html"]What Is A Business Partner[/url], http://pedrrosso.isuisse.com/what-is-a-business-partner.html What Is A Business Partner, wwh, <a href="http://valdemadera.isuisse.com/what-is-a-flying-buttress.html">What Is A Flying Buttress</a>, [url="http://valdemadera.isuisse.com/what-is-a-flying-buttress.html"]What Is A Flying Buttress[/url], http://valdemadera.isuisse.com/what-is-a-flying-buttress.html What Is A Flying Buttress, %-[, <a href="http://valdemadera.isuisse.com/what-is-a-dermatologist.html">What Is A Dermatologist</a>, [url="http://valdemadera.isuisse.com/what-is-a-dermatologist.html"]What Is A Dermatologist[/url], http://valdemadera.isuisse.com/what-is-a-dermatologist.html What Is A Dermatologist, gmgetw, <a href="http://chaccon.isuisse.com/what-is-a-healthy-body-fat.html">What Is A Healthy Body Fat</a>, [url="http://chaccon.isuisse.com/what-is-a-healthy-body-fat.html"]What Is A Healthy Body Fat[/url], http://chaccon.isuisse.com/what-is-a-healthy-body-fat.html What Is A Healthy Body Fat, %-]], <a href="http://perralta.isuisse.com/what-is-a-linear-pair.html">What Is A Linear Pair</a>, [url="http://perralta.isuisse.com/what-is-a-linear-pair.html"]What Is A Linear Pair[/url], http://perralta.isuisse.com/what-is-a-linear-pair.html What Is A Linear Pair, %]], <a href="http://chaccon.isuisse.com/what-is-a-doctorate-degree.html">What Is A Doctorate Degree</a>, [url="http://chaccon.isuisse.com/what-is-a-doctorate-degree.html"]What Is A Doctorate Degree[/url], http://chaccon.isuisse.com/what-is-a-doctorate-degree.html What Is A Doctorate Degree, :-]], <a href="http://trevvino.isuisse.com/what-is-a-boilermaker.html">What Is A Boilermaker</a>, [url="http://trevvino.isuisse.com/what-is-a-boilermaker.html"]What Is A Boilermaker[/url], http://trevvino.isuisse.com/what-is-a-boilermaker.html What Is A Boilermaker, 661376,

.

So I decided to take a look at what it would take to do so with the current IronPython version. I used IronPython 2 Beta 3, based upon the current version of the Dynamic Language Runtime, which is still evolving so the classes might have changed, take care! You can download the latest IronPython release here.

.

clr.AddReference('IronPythonTest2')

.

from IronPythonTest2 import HelloWorldVB

.

Basically this code adds a reference to the IronPythonTest2 assembly, this is my console application containing the previous VB code. Next it imports the HelloWorldVB type from the assembly. Now it know about the type we can go ahead and derive from that type and create a new one. This exactly what the line class HelloWorldIronPython(HelloWorldVB) does, it creates a new type called HelloWorldIronPython. Next we override the HelloWorld function and return a different welcome string. A few things to note here: Python uses indentation to specify blocks, so the function being indented from the class is a part of that and the line of code with the return is indented from the def that defines the function so it is part of the function body. Another interesting thing is the self parameter. Every function in Python is passed a reference to itself as the first parameter. Sort of like the implicit Me in VB except a bit more obvious.

.

As a small test I created a small workflow containing a ConditionedActivityGroup activity with three CodeActivities as childs and an UntilCondition. The conditions are pretty simple:

.

Testing CAG Until - Counter = -2

.

Testing Condition 1 - Counter = -1

.

Testing Condition 2 - Counter = -1

.

Testing Condition 3 - Counter = -1

.

Testing CAG Until - Counter = -1

.

Testing Condition 1 - Counter = 0

.

Testing CAG Until - Counter = 0

.

Testing Condition 2 - Counter = 1

.

Testing CAG Until - Counter = 1

.

Testing Condition 3 - Counter = 2

.

Testing CAG Until - Counter = 2

.

Testing Condition 1 - Counter = 3

.

Testing CAG Until - Counter = 3

.

Testing Condition 1 - Counter = 4

.

Testing Condition 2 - Counter = 4

.

Testing CAG Until - Counter = 4

.

Testing Condition 1 - Counter = 5

.

Testing Condition 2 - Counter = 5

.

Testing Condition 3 - Counter = 5

.

Not at all what I expected and although I believe its in spirit with the docs its certainly confusing. The first time round all When conditions are executed followed by all activities, basically the whole batch is tested and run. And the subsequent loops each activity is separately tested, including the CAG itself, and executed.

.

Error 2 Could not create activity of type 'WorkflowConsoleApplication1.Activities.TestEventActivity1'. System.ArgumentException: Type 'WorkflowConsoleApplication1.Activities.TestEventActivity1' does not define a static dependency property with name 'StatusProperty'.

.

If you are trying to raise an event from an ExternalDataExchange service the most likely cause of the problem is adding the service object to the WorkflowRuntime instead of the ExternalDataExchangeService. Calling the ExternalDataExchange service from the workflow will work just fine but raising an event will not work. If you are using C# and not testing for null you will get an NullReferenceException "Object reference not set to an instance of an object.".

.

Not quite sure what this interface is for. However when I creates a test project I received the error:

.

Create a service interface, mine is nice and simple and add a few ReceiveActivity to the workflow and hoop up the service interface to the activities. No big deal so far and we can test things by just pressing F5 and having the WCF Test Client. Actually you can only call functions that are hooked up to an ReceiveActivity with the CanCreateInstance set to True so the WCF Test Client might not be all that useful here if you use multiple ReceiveActivity that are part of a single workflow or conversation.

.

namespace TestClient

.

A StateWorkflow is one of the two basic workflow models included with WindowsWorkflowFoundation, the other being a SequentialWorkflow. A StateWorkflow is basically an implementation of a FiniteStateMachine. The main advantage of a StateWorkflow is that the workflow can switch between states at will, either because of a SetStateActivity in an event handler or explicitly by using the SetStateQueue queue with a SetStateEventArgs argument indicating the target state.

.
Summary
.

One of the more powerfull mocking frameworks available for .NET unit testing.

.

UnitTestingWorkflowActivities

.

UnitTestingAsynchronousWorkflowActivities

.
Summary
.

In UnitTestingWorkflowActivities I demonstrated how TypeMock allowed us to mock out the workflow runtime infrastructure and create true unit tests for a workflow activity. Now this may not seems like a big deal but because most of the classes in the workflow runtime are sealed mocking them with another mocking framework is pretty much impossible. Now you can test custom activities by wrapping them in a test workflow, creating a workflow runtime, running the workflow and inspecting the result I can hardly call this a unit test as we have to create lots of, complex, depended objects. So TypeMock really opens up some new possibilities here.

.

In this case the return value from the Execute depends on the Message property being filled or not so we need to test this. First a simple test for an activity with an empty message:

.

///A test for Execute

.

[TestMethod()]

.

[DeploymentItem("WFUnitTest1.exe")]

.

public void ExecuteTestEmpty()

.

In this test I actually check that the runtime service, called WriteLineService3 in this case, is never retrieved. This test is still pretty simple and no more complicated than the test we did previously.

.

Lets take a look at something more complicated. The following test has the Message property set so it is expected to call the runtime service. But being an asynchronous activity it is also required to create a WorkflowQueue and bind to its QueueItemAvailable event so we will check that has happened. Finally this time the Execute function should return a status of ActivityExecutionStatus.Executing as it isn't done yet. This test runs like this:

.

///A test for Execute

.

[TestMethod()]

.

[DeploymentItem("WFUnitTest1.exe")]

.

public void ExecuteTestStart()

.

In this case we are binding to the QueueItemAvailable event so we need to add another test for the event handler and make sure it informs the workflow runtime we are done.

.

///A test for queue_QueueItemAvailable

.

[TestMethod()]

.

[DeploymentItem("WFUnitTest1.exe")]

.

public void queue_QueueItemAvailableTest()

.

That leaves us with writing a unit test for the runtime service itself. This runtime service actually looks like this:

.

Not very complicated or realistic for that matter but still lets write a quick unit test for it like this:

.

///A test for WriteLine

.

[TestMethod()]

.

public void WriteLineTest()

.

The most important thing here is that we can mock the WorkflowInstance object just as easy as the ActivityExecutionContext in the previous tests. I am actually telling TypeMock to wait for 10 seconds with the [VerifyMocks(10000)] attribute. This allows the delay in the service to remain there and still check if the expected response was queued. One thing to note is that I had to create an extra GetWorkflow() function to wrap the real function on the WorkflowRuntime object. I was unable to mock the latter however I am unsure why this is the case and if mocking it is really impossible.

.
Summary
.

Most people consider unit testing of custom workflow activities to pretty much impossible. Sure you can create a dummy test workflow containing your new activity, new up a WorkflowRuntime, create a WorkflowInstance and start it. But just think about all the dependencies here with the extra dummy workflow and the complete WorkflowRuntime with all its dependencies. Hardly a unit test for an activity but more like an integration test. Now there is nothing wrong with integration tests, they are very useful and necessary, but they do not give the speedy and dynamic test coverage you expect and need from a unit test.

.

This can easily be tested with a unit test like this.

.

///A test for Execute

.

[TestMethod()]

.

[DeploymentItem("WFUnitTest1.exe")]

.

public void ExecuteTest()

.

So that at least proves some activities can be unit tested Smile

.

So lets create a few unit tests for this activity. The first test checks the behavior when the message is empty:

.

///A test for Execute

.

[TestMethod()]

.

[DeploymentItem("WFUnitTest1.exe")]

.

public void ExecuteTestNoMessage()

.

///A test for Execute

.

[TestMethod()]

.

[DeploymentItem("WFUnitTest1.exe")]

.

public void ExecuteTestWithMessage()

.

Now I won't claim to know every mocking framework out there but as far as I know TypeMock is the only one that can to this and create proper unit test for a custom workflow activity.

.

See also UnitTestingAsynchronousWorkflowActivities

.
        Console.WriteLine("Testing with data '{0}'", data)
.

There are a few interesting, and unexpected, thing to be a aware of when you use an UntilCondition with a ReplicatorActivity. When I run this simple test workflow I receive the following output:

.

Removing the test for the "Stop here" in the UntilCondition result in the following output:

.
Summary
.
                                "]||{+}", each.LastModified.ToShortDateString(), " ", each.LastModified.ToShortTimeString(), 
.
        this.myCustomActivity1.TestValue == True
.
        ((WorkflowConsoleApplication1.MyCustomActivity)this.GetActivityByName("myCustomActivity1")).TestValue