Skip to content

Instantly share code, notes, and snippets.

View abdkayali's full-sized avatar

Abdul Rahman Kayali abdkayali

View GitHub Profile
@gilles-leblanc
gilles-leblanc / AssertExtension.cs
Created January 26, 2014 20:47
A better alternative than using the ExpectedException attribute for catching exceptions in C#.
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestUtilities
{
public static class AssertExtension
{
public static T Throws<T>(Action expressionUnderTest, string exceptionMessage = "Expected exception has not been thrown by target of invocation.") where T : Exception
{
try
@datagrok
datagrok / git-serve.md
Last active April 21, 2023 07:33
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.