View TestController.cs
namespace FromUri.Controllers
{
using System;
using System.Web.Http;
/// <summary>
/// Url sample call:
/// http://localhost:50872/api/test?key.org=abc&key.dest=123&key.when=2010-01-01T00:00:00&foo=1&bar=bbbrr&foobar.foo=2&foobar.bar=xyz
/// </summary>
View AsyncTest.swift
import XCTest
class AsyncTests: XCTestCase {
func testExample() {
//set expectaton
let expectation = expectationWithDescription("Swift Expectations")
let url = NSURL(string: "http://www.stackoverflow.com")
let request = NSURLRequest(URL: url!)
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {
View CustomTextField.swift
import Foundation
import UIKit
class CustomTextField: UITextField, UITextFieldDelegate{
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.delegate = self
}
View SampleJavKoan.java
@Koan
public void localTime () {
LocalTime t1 = LocalTime.of(7,30);
assertEquals(t1, LocalTime.parse(__));
}
View SimpleJava8Lambda.java
interface Caps {
public String capitalize(String name);
}
@Koan
public void simpleLambda() {
Caps caps = (String n) -> {
return n.toUpperCase();
};
String capitalized = caps.capitalize("James");
View Money.js
function Money(amount, currency){
this.amount = amount;
this.currency = currency;
this.sum = function (money){
return new Money(200, "CLP");
}
}
View AddtionTest.java
package com.empoweragile;
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;