Skip to content

Instantly share code, notes, and snippets.

View vella-nicholas's full-sized avatar

Nicholas Vella vella-nicholas

View GitHub Profile
@vella-nicholas
vella-nicholas / ObserverPatternC#.cs
Created March 15, 2019 16:51 — forked from kashifmunir/ObserverPatternC#.cs
Observer Pattern Example C#
/// <summary>
/// Observer class
/// </summary>
abstract class Observer
{
public abstract void notify(string eventName, object eventValue);
}
/// <summary>
/// Observable class
@vella-nicholas
vella-nicholas / MockHttpClient.cs
Created April 15, 2019 10:05 — forked from GeorgDangl/MockHttpClient.cs
Mock an Asp.Net Core HttpClient with a custom HttpMessageHandler using Moq
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Moq;
using Moq.Protected;
namespace Tests
{
public class MockHttpClient
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py