Skip to content

Instantly share code, notes, and snippets.

View has-taiar's full-sized avatar

Has AlTaiar has-taiar

View GitHub Profile
@has-taiar
has-taiar / gist:ace5cbd295d024cb19b6
Created June 29, 2014 01:30
Sample of iOS Platform-Specific Code
public class TestableController : UIViewController
{
public TestableController ()
{
}
public int GetTotal(int first, int second)
{
return first + second;
}
@has-taiar
has-taiar / gist:4577bb9668de957bd5af
Last active August 29, 2015 14:03
Sample of Android Platform-Specific Code
namespace Tdd.Mobile.Android
{
public class TestableController : Fragment
{
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
}
public int GetTotal(int first, int second)
@has-taiar
has-taiar / gist:075c5f1ce2dd600abc38
Last active August 29, 2015 14:03
NUnitLite Test Code (for both Android and iOS)
[TestFixture]
public class TestableControllerTest
{
[Test]
public void GetTotalTest()
{
// arrange
var controller = new TestableController ();
// act
@has-taiar
has-taiar / Kloud_Sample-of-NunitLite-Test-Code.cs
Last active August 29, 2015 14:03
TDD for Mobile Development
[TestFixture]
public class TestableControllerTest
{
[Test]
public void GetTotalTest()
{
// arrange
var controller = new TestableController ();
// act
@has-taiar
has-taiar / AndroidSignatureCaptureView
Last active October 31, 2017 02:40
Android Signature Capture View
using System;
using Android.Content;
using Android.Graphics;
using Android.Views;
namespace MyApp.Views
{
public class CaptureSignatureView : View
{
public CaptureSignatureView(Context c, SignatureData signatureData) : base(c)