Skip to content

Instantly share code, notes, and snippets.

@tabareh
tabareh / test.cs
Last active March 1, 2018 10:47
[Test skeleton] #Discipline_Test
#region Additional test attributes
//
// You can use the following additional attributes as you write your tests:
//
// Use ClassInitialize to run code before running the first test in the class
// [ClassInitialize()]
// public static void MyClassInitialize(TestContext testContext) { }
//
// Use ClassCleanup to run code after all tests in a class have run
// [ClassCleanup()]
@tabareh
tabareh / test.cs
Last active March 1, 2018 10:47
[Http response assertion] #Discipline_Test
//
var emptyResult = await this.controller.Get("", 3000) as BadRequestErrorMessageResult;
var nullResult = await this.controller.Get(null, 300) as BadRequestErrorMessageResult;
// Assert
emptyResult.Should().NotBeNull();
nullResult.Should().NotBeNull();
@tabareh
tabareh / test.cs
Last active March 1, 2018 10:46
[Verify exception] #Discipline_Test
[TestMethod]
[TestCategory(TestCategory.Gated)]
public void Will_throw_exception_on_invalid_branch_unit_code()
{
//Act
Action moreDigits=() =>
{
var result = _legalUnitStrategy.Transform("L9010");
@tabareh
tabareh / C# feature history.md
Last active September 5, 2017 12:26
C# Feature History

C# features history

C# 1.0

XML comments

				/// <summary>
				///  This class performs an important function.
				/// </summary>

Delegates ( a way to define a type for methods according to signature)

				// Declare a delegate:
				delegate void Del(int x);