Skip to content

Instantly share code, notes, and snippets.

View TestHelper.cs
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, StringComparison.Ordinal, DiffStyle.Full, Console.Out, string.Empty);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, string message)
{
ShouldEqualWithDiff(actualValue, expectedValue, StringComparison.Ordinal, DiffStyle.Full, Console.Out, message);
@segilbert
segilbert / CxServices.asmx
Created Apr 18, 2012
Quiz Question: How do I use webMethod to call GetMessages?
View CxServices.asmx
[WebMethod(true)]
public string GetMessages(string psUserId)
{
List<JxMessage> messages = new List<JxMessage>();
// .... do some logic like get the message list
// Send it back as JSON
return CxJSONHelper.Serialize(messages);
}
@segilbert
segilbert / IdeaStrikeSpecBase.cs
Created Apr 5, 2012
IdeaStrike Test Project Nancy Autofac Bootstrapper
View IdeaStrikeSpecBase.cs
//
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Linq.Expressions;
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
//
using Ideastrike;
@segilbert
segilbert / complus_remove_apps
Created Jan 20, 2012
Remove COM+ Applications Pro-grammatically from COM+ Services
View complus_remove_apps
On Error Resume Next
For Each objItem in colItems
' Create an instance of COMAdmin Catalog
set cat = CreateObject( "COMAdmin.COMAdminCatalog" )
' Reference the Applications Collection
Set apps = cat.GetCollection("Applications")
' Retrieve the data
apps.Populate