Format:
Recent snippets matching tags of Test
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace Nixoncorp.LoopPerformance { class Test {
43 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace Nixoncorp.LoopPerformance { class Test {
15 Views
no comments
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,
44 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()
30 Views
no comments
public class EnableArtistTrackActionSpecs { private readonly Playlist playlistFake; private readonly ArtistTrack trackToEnable; public EnableArtistTrackActionSpecs() { playlistFake = new Playlist(); trackToEnable = MockRepository.GenerateStub<ArtistTrack>(); }
46 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;
253 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
64 Views
no comments
//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) {
148 Views
no comments
namespace Repository.EntityFramework { //Entity Class Under Test public partial class Story { public ICollection<Tag> Tags { get { if(!TagsInternal.IsLoaded)
92 Views
no comments
//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) {
86 Views
no comments
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.
82 Views
no comments
''' <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)
49 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
