Format:
Recent snippets matching tags of Unit Test
[TestClass] public class MyTests { static System.Threading.ManualResetEvent m_Trigger = new System.Threading.ManualResetEvent(false); [TestMethod] private static void MyTest() { Exception ex = null;
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")
398 Views
no comments
/// <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
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;
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
403 Views
no comments
[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()
330 Views
no comments
// ********************************** // 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;
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
304 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
