Usefull unittest links

While updating my unittest I found two challenges:
1. Start the development fabric from my unittest solution

// Reference Microsoft.ServiceHosting.Tools.dll in the Windows Azure SDK folder.
DevStore ds = new DevStore();
// IsRunning checks whether the service is running.
if (false == ds.IsRunning())
{
     // EnsureRunning will try to start the service if it's not running.
     ds.EnsureRunning(1000);
}

2. Compare byte arrays solution

byte[] array1 = new byte[] { 1, 2, 3, 4 };
byte[] array2 = new byte[] { 1, 2, 3, 4 };
bool areEqual = array1.SequenceEqual(array2); //returns true

About erictummers

My work as a recruited developer changes almost every month. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Test and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s