Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Summarizing all written you should be aware of couple important points in writing Unit Tests for Silverlight. <hr> <strong><code>[Asynchronous]</code></strong><br> Attribute of test method shows that you are testing part which includes async operations and want to syncronize them for testing purposes. Asynchrony itself in Silverlight Unit Tests Framework is a bit distorted. All "Enqueue" directives are like "postpone this until something happens" which is not a sense which the traditional programming asynchrony meaning has.</p> <p><hr> <strong><code>EnqueueConditional</code></strong> <br>Otherwords means wait until condition will be met. And this is one of the most important parts of async tests. After condition becomes legal all <code>EnqueueCallbacks</code> until the next <code>EnqueueConditional</code> will be executed.</p> <p><a href="https://stackoverflow.com/questions/1905353/waiting-for-event-triggering-in-silverlight-unit-tests"><em>Important note:</em></a> </p> <blockquote> <p><code>EnqueueConditional</code> repeatedly calls the predicate passed to it on a timer/background thread, checking each time to see if it returns true.</p> </blockquote> <p>That's why you should avoid using heavy, complex logic within conditions.</p> <p><hr> <strong><code>EnqueueCallback</code></strong> <br>Defers code execution until <code>EnqueueConditional</code> that precedes it will met condition. It enqueues an <code>Actoin</code> or an array of <code>Actions</code>.</p> <p><hr> <strong><code>EnqueueDelay</code></strong> <br> Enqueues minimum number of milliseconds/time delay before continuing.</p> <p><hr> <strong><code>EnqueueTestComplete</code></strong><br> Enqueues an action to call <strong><code>TestComplete</code></strong> which signals that a test is complete when using Async testing. </p> <p><em>Important Note(from documentation):</em> </p> <blockquote> <p>If you use your own methods for completing, such as an HtmlTimer or other threading method, it is possible that this call will occur <em>AFTER</em> the test has timed out when using Timeouts. As such, be very careful as you could complete the call to the <em>next</em> test.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload