Skip to content

Instantly share code, notes, and snippets.

@markschabacker
markschabacker / post_run_script.rb
Created December 7, 2012 21:32
Xcode 4.5 Command Line Unit Tests
# Run iOS Unit Tests from the command line with Xcode 4.5 and iOS 6
# Adapted from Scott Thompson at http://stackoverflow.com/a/10823483/1359212
#
# Steps:
# 1. Create a new Xcode Scheme for the Tests target
# 2. Edit the Tests Scheme so that the "Run" checkbox is checked for the Tests target
# 3. Use this script as the Test Target's "Run Script" entry on the "Build Phases" tab
# 4. Run tests from the command line with:
# xcodebuild -sdk iphonesimulator -scheme 'TestSchemeName' build SL_RUN_UNIT_TESTS=YES
@markschabacker
markschabacker / IPInsetLabel.h
Created May 8, 2012 22:22
IPInsetLabel: a simple UILabel subclass that adds padding insets and auto-height-resizing
//
// IPInsetLabel.h
// Instapaper
//
// Created by Marco Arment on 7/23/11.
// Copyright 2011 Instapaper LLC, released to the public domain.
//
#import <UIKit/UIKit.h>
@markschabacker
markschabacker / RunPlatformUnitTests.sh
Created February 17, 2012 01:04
Xcode 4.3 and xcodebuild Unit Tests
# /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/RunPlatformUnitTests
# around line 93
if [ "${TEST_HOST}" != "" ]; then
if [ "${RUN_SIMULATOR_TESTS}" = "YES" ]; then
export OTHER_TEST_FLAGS="-RegisterForSystemEvents"
RunTestsForApplication "${TEST_HOST}" "${TEST_BUNDLE_PATH}"
else
Warning ${LINENO} "Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set)."
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GenericImplementationMapping
{
internal class AutomatedNoteStrategyCustomer : IsAAutomatedNoteStrategy<Customer>
{
private Customer _parent;