This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Simple.HttpClientFactory; | |
using Simple.HttpClientFactory.MessageHandlers; | |
using System; | |
using System.Net.Http; | |
namespace HttpClientFactory472 | |
{ | |
internal class Program | |
{ | |
//use static handler to reuse ports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
class CustomTextField: UITextField, UITextFieldDelegate{ | |
required init(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
self.delegate = self | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Koan | |
public void localTime () { | |
LocalTime t1 = LocalTime.of(7,30); | |
assertEquals(t1, LocalTime.parse(__)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Caps { | |
public String capitalize(String name); | |
} | |
@Koan | |
public void simpleLambda() { | |
Caps caps = (String n) -> { | |
return n.toUpperCase(); | |
}; | |
String capitalized = caps.capitalize("James"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Money(amount, currency){ | |
this.amount = amount; | |
this.currency = currency; | |
this.sum = function (money){ | |
return new Money(200, "CLP"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |