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 test
' 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
48 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();
}
69 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
37 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
36 Views
no comments
 
Public Class frmMain
 
    Public Sub New()
        InitializeComponent()
    End Sub
 
    Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
        Try
            If MsgBox("Are you sure you want to exit?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Exit?") = MsgBoxResult.No Then
                e.Cancel = True
by Justin Davis   May 13, 2010 @ 1:13pm
Tags: test
25 Views
no comments
 
C#
 
/// <summary>
///This is a test class for MemberTest and is intended
///to contain all MemberTest Unit Tests
///</summary>
[TestClass()]
public class MemberTest
{
    public void CanGetArgHelper(string argument)
    {
by Jonathan Chayce Dickinson   April 13, 2010 @ 3:07am
36 Views
no comments
 
C#
  private string _Hi;
         public string hi
         {
             get
             {
                 return _Hi;
             }
             set
             {
                 SetPropertyValue("hi", ref _Hi, value);
by www_gnz   April 08, 2010 @ 3:16am
Tags: hi test
37 Views
no comments
 
C#
Teste
by renatoperson   March 08, 2010 @ 10:41am
Tags: Teste
32 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
 
namespace Nixoncorp.LoopPerformance
{
    class Test
    {
by Jerry Nixon   February 23, 2010 @ 12:54pm
219 Views
no comments
 
    Throw New System.NotImplementedException()
by Martin Harris   February 08, 2010 @ 4:29pm
Tags: Test
89 Views
no comments
 
C#
public void Send_DatabaseTimeOutNewsletterFails_LastPublishDateNotChanged()
{          
    //Arrange
    var originalNewsletter = new AutomaticNewsletter()
                         {
                             Id = 1,
                             Name = "TestNewsletter",
                             LastPublishStatus = PublishStatus.NotSent,
                             LastPublishDate = new DateTime(2000, 01, 01),
                             PublishDay = DayOfWeek.Friday,
by serbrech   January 27, 2010 @ 4:28am
71 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
83 Views
no comments
 
C#
public class EnableArtistTrackActionSpecs
{
    private readonly Playlist playlistFake;
    private readonly ArtistTrack trackToEnable;
 
    public EnableArtistTrackActionSpecs()
    {
        playlistFake = new Playlist();
        trackToEnable = MockRepository.GenerateStub<ArtistTrack>();
    }
by Scott Muc   October 29, 2009 @ 3:40pm
77 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
337 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
107 Views
no comments
 
C#
//Class Under Test
public class CategoryRepository : BaseRepository<Category>
{
    //EntityContainer is an ObjectContext
    public CategoryRepository(EntityContainer context)
        : base(context){}
 
    //Method Under Test
    public Category FindById(Guid id)
    {
by Muhammad Mosa   September 02, 2009 @ 10:58am
207 Views
no comments
 
C#
namespace Repository.EntityFramework
{
    //Entity Class Under Test
    public partial class Story
    {
        public ICollection<Tag> Tags
        {
            get
            {
                if(!TagsInternal.IsLoaded)
by Muhammad Mosa   September 01, 2009 @ 2:38pm
124 Views
no comments
 
C#
//Class under test code snippet
public class CategoryRepository : BaseRepository<Category>
{
        //EntityContainer class is an ObjectContext of Entity Framework
        public CategoryRepository(EntityContainer context)
            : base(context)
        {
        }
        public override void Add(Category category)
        {
by Muhammad Mosa   August 31, 2009 @ 1:55pm
131 Views
no comments
 
C#
public class Terminal_Receipt_Onscale : StoryAcceptanceTest {
   protected override void tell_story() {
      NotCheckedInTransaction transaction = GetNotCheckedInTransaction(TransactionType.Receipt, _settings.ShipmentTareThreshold, _settings.ReceiptTareThreshold);
      transaction.AutomationType = AutomationType.OnScale;
      transaction.RequiresSeals = true;
 
      when_locating_transactions(
         @do =>
            _container.GetInstance<ICheckInPresenter>().AttemptCheckIn("code"),
         will => will.
by George Mauer   August 20, 2009 @ 2:36pm
Tags: bdd, storytest
110 Views
no comments
 
C#
''' <summary>
    ''' Method to load the data that needs to be loaded after the main data driver
    ''' for this page has been loaded to set object values on controls
    ''' </summary>
    ''' <remarks>
    ''' </remarks>
    Protected Sub LoadSecondaryData()
 
        Dim _cashBalance As Double = ManagedFundsFactory.GetCashBookBalance(UserSelectedAccounts.PrimarySelectedAccount.AccountID)
        Dim _pendingBalance As Double = ManagedFundsFactory.GetPendingCashBookBalance(UserSelectedAccounts.PrimarySelectedAccount.AccountID)
by flazx   July 27, 2009 @ 2:03am
Tags: test
68 Views
no comments
 
SQL
select * From sql
by test   July 23, 2009 @ 6:42am
Tags: test
58 Views
1 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