Skip to content

Instantly share code, notes, and snippets.

@chribben
chribben / TestSendReceive_using_MT_No_IoC.cs
Created February 12, 2012 22:36
Quantum.TestSendReceive w/o IoC
[TestFixture]
public class TestSendMessageReceiveEventNoIoC
{
private readonly Guid _aggregateId = Guid.NewGuid();
private static readonly ILog Logger = LogManager.GetLogger(typeof (TestSendMessageReceiveEvent));
private readonly ManualResetEvent _received = new ManualResetEvent(false);
public TestSendMessageReceiveEventNoIoC()
{
BasicConfigurator.Configure();
@chribben
chribben / EventsNotPublishedUsingMT.cs
Created February 1, 2012 21:19
Events that aren't published
//Test
[TestFixture]
public class TestSendMessageReceiveEvent
{
private IWindsorContainer _container;
private readonly Guid _aggregateId = Guid.NewGuid();
private static readonly ILog _Logger = LogManager.GetLogger(typeof (TestSendMessageReceiveEvent));
private readonly ManualResetEvent _received = new ManualResetEvent(false);
public TestSendMessageReceiveEvent()
@chribben
chribben / FailingMTUnitTest.cs
Created January 14, 2012 20:55
Failing MT unit test
[Scenario]
public class Test_Bus_Subscriptions_For_Consumers_In_Dummy_Saga_Using_Castle_As_IoC :
Given_a_service_bus_instance
{
readonly IWindsorContainer _container;
public Test_Bus_Subscriptions_For_Consumers_In_Dummy_Saga_Using_Castle_As_IoC()
{
_container = new WindsorContainer();
_container.Register(
[STAThread]
static void Main()
{
_nui = new Runtime();
var app = new Application();
var window = new Window();
InitializeNui(); //Initializing the Runtime object and opening video streams
CreateGUI(window); //Setting up a canvas to hold the RGB video and the image attached to the hand of captured person
var skeletonFrameReadyObservable = Observable.FromEventPattern(_nui, "SkeletonFrameReady");
var trackedSkeletons = from ev in skeletonFrameReadyObservable