Skip to content

Instantly share code, notes, and snippets.

Avatar

Abdollah Tabareh tabareh

View GitHub Profile
@tabareh
tabareh / test.cs
Last active Mar 1, 2018
[Test skeleton] #Discipline_Test
View test.cs
#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 Mar 1, 2018
[Http response assertion] #Discipline_Test
View test.cs
//
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 Mar 1, 2018
[Verify exception] #Discipline_Test
View test.cs
[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 Sep 5, 2017
C# Feature History
View C# feature history.md

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);
You can’t perform that action at this time.