This file contains 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
/* | |
Example of an acceptance test written without any of the layering: | |
*/ | |
@Test | |
public void shouldDeductPaymentFromAccountBalance() { | |
selectURL(“http://my.test.bank.url"); | |
enterText(“userNameFieldId”, “testUserName”); | |
enterText(“passwordFieldId”, “testPassword”); | |
click(“loginButtonId”); | |
waitForResponse(“loginSuccessIndicator”); |
This file contains 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(angular) { | |
'use strict'; | |
fetchConfig().then(bootstrapApplication); | |
function fetchConfig() { | |
var injector = angular.injector(['ng']); | |
var $http = injector.get('$http'); | |
return $http.get('config.json').then(function(response) { |
This file contains 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
asyncTest( "multiple async setTimeout", function() { | |
expect( 4 ); | |
// Limit total time to 2 sec. | |
var counter = 2, timeout = setTimeout(function() {start();}, 2000); | |
function done() { if(--counter === 0) {start(); clearTimeout(timeout);}} | |
var url = "http://jsfiddle.net/echo/jsonp/?callback=?"; | |
$.getJSON( url, { a: 1 }, function( data ) { |
This file contains 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
/* | |
Copyright 2009-2011 Urban Airship Inc. All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
2. Redistributions in binaryform must reproduce the above copyright notice, |