CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Unit Test
C#
[TestClass]
public class MyTests
{
    static System.Threading.ManualResetEvent m_Trigger
        = new System.Threading.ManualResetEvent(false);
 
    [TestMethod]
    private static void MyTest()
    {
        Exception ex = null;
by Jerry Nixon   August 21, 2010 @ 9:22pm
Tags: Unit Test, C#
481 Views
no comments
 
' Import ...
 
Public Module EnvironmentEvents
 
' Autogenerated code ...
 
    Private Sub BuildEvents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildDone
        If (DTE.ToolWindows.ErrorList.ErrorItems.Count = 0) Then
            SelectRootNode()
            DTE.ExecuteCommand("TestDriven.NET.RunTests")
by Dennis Traub   June 17, 2010 @ 9:40pm
398 Views
no comments
 
C#
/// <summary>
/// Holds up the test execution for the given duration without blocking the UI thread.
/// </summary>
void UIPause(int sec)
{
    Storyboard PauseSB = new Storyboard() { Duration = new Duration(new TimeSpan(0, 0, sec)) };
    PauseSB.Completed += (sender, e) => { TestComplete(); };
    PauseSB.Begin();
}
500 Views
no comments
 
C#
using System.IO;
using System.Reflection;
using System.Timers;
using System.Windows.Forms;
using EnvDTE;
using Timer = System.Timers.Timer;
 
namespace SilverlightTestRunner {
    public class TestRunner {
        private readonly DTE _applicationObject;
by Keith   May 31, 2010 @ 5:42pm
393 Views
no comments
 
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports EnvDTE100
Imports System.Diagnostics
Imports System.IO
Imports System.Threading
Imports System.ComponentModel
by Keith   May 31, 2010 @ 5:32pm
403 Views
no comments
 
C#
[TestMethod]
public void CanGetValueItemfromCollection()
{
    var col = new Collection<string> {"Hello", "World"};
    var testItem = col.GetValueItem(c => c.Equals("World"));
    Assert.AreEqual(testItem, "World");
}
 
[TestMethod]
public void CanGetReferenceItemfromCollectionByProperty()
by Bob Baker   December 18, 2009 @ 12:01pm
330 Views
no comments
 
C#
// **********************************
// By Roy Osherove : www.osherove.com
// see example usage of this code at http://weblogs.asp.net/rosherove/archive/2009/10/23/typemoq-api.aspx 
// **********************************
 
using System;
using System.Linq;
using System.Linq.Expressions;
using TypeMock.ArrangeActAssert;
by Roy Osherove   October 23, 2009 @ 6:08am
723 Views
no comments
 
Sub RemoveExclusiveAttributes()
    Dim originalSyntax = DTE.Find.PatternSyntax
    Dim originalWhat = DTE.Find.FindWhat
    Dim originalTarget = DTE.Find.Target
    Dim originalAction = DTE.Find.Action
 
    DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral
    DTE.Find.FindWhat = "[Exclusive]"
    DTE.Find.Target = vsFindTarget.vsFindTargetCurrentProject
    DTE.Find.Action = vsFindAction.vsFindActionFind
by Jeff Handley   October 22, 2009 @ 10:49pm
304 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate