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
package com.talios; | |
import com.google.common.base.Optional; | |
import com.talios.App; | |
import com.theoryinpractise.halbuilder.ResourceFactory; | |
import com.theoryinpractise.halbuilder.spi.Link; | |
import com.theoryinpractise.halbuilder.spi.ReadableResource; | |
import com.theoryinpractise.halbuilder.spi.RenderableResource; | |
import com.theoryinpractise.halbuilder.spi.Resource; | |
import java.util.List; |
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
(ns haltest | |
(:use [clojure.test])) | |
(deftest haltest | |
(let [resource-factory (com.theoryinpractise.halbuilder.ResourceFactory.) | |
resource (doto (.newHalResource resource-factory "/foo") | |
(.withProperty "name" "Mark") | |
(.withLink "/home" "home"))] | |
(println (.renderXml (.asRenderableResource resource)))) ) |
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
Process: Google Chrome [1553] | |
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome | |
Identifier: com.google.Chrome | |
Version: 17.0.932.0 (932.0) | |
Code Type: X86 (Native) | |
Parent Process: launchd [219] | |
Date/Time: 2011-11-11 10:44:44.513 +1300 | |
OS Version: Mac OS X 10.7.2 (11C74) | |
Report Version: 9 |
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
df := NSDateFormatter new. | |
df setDateFormat: 'yyyy-MM'. | |
iTunes := SBApplication applicationWithBundleIdentifier:'com.apple.iTunes'. | |
playlists := (iTunes sources at: 0) playlists. | |
playlist := (playlists where: playlists name = 'The Full Daily Play') top. | |
playlist tracks do: [:track | | |
skipDate := (NSDate dateWithString: (df stringFromDate: track dateAdded) ++ '-01 00:00:00 +1200'). |
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
private ParameterizedType findParameterizedClass(Class clazz) { | |
if (clazz.getGenericSuperclass() != null && clazz.getGenericSuperclass() instanceof ParameterizedType) { | |
return (ParameterizedType) clazz.getGenericSuperclass(); | |
} else { | |
if (clazz.getSuperclass() != null) { | |
return findParameterizedClass(clazz.getSuperclass()); | |
} else { | |
throw new ClassCastException(clazz.getName() + " is not generic."); | |
} | |
} |
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
iTunes := SBApplication applicationWithBundleIdentifier:'com.apple.iTunes' | |
playlists := ((iTunes sources at: 0) playlists. | |
playlist := (playlists where: playlists name = 'The Full Daily Play'). | |
playlist tracks do: [:track | | |
track setSkippedDate: (NSDate dateWithString: | |
(track dateAdded description substringWithRange: (NSValue rangeWithLocation:0 length:8)) | |
++ '01 00:00:00 +1200') |
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
American Heritage - Sedentary | |
Amon Amarth - Surtur Rising | |
Amorphis - The Beginning of Times | |
Arch Enemy - Khaos Legions | |
Avantasia - The Flying Opera ( Around The World in 20 Days ) | |
Beardfish - Mammoth | |
Becoming The Archetype - Celestial Completion | |
Believer - Transhuman | |
Blackfield - Welcome To My DNA | |
Blood Ceremony - Living With The Ancients |
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
<html xmlns:concordion="http://www.concordion.org/2007/concordion" | |
xmlns:talios="http://www.talios.com/2010/concordion"> | |
<head>Some Other Test</head> | |
<body> | |
<p class="info"> | |
All tests are assumed to be run against username <b concordion:set="#username">username</b> and the password | |
<b concordion:set="#password">password</b>. | |
</p> |
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
(require 'clojure.contrib.datalog.tests.test) | |
(require 'clojure.contrib.datalog.tests.test-database) | |
(require 'clojure.contrib.datalog.tests.test-literals) | |
(require 'clojure.contrib.datalog.tests.test-magic) | |
(require 'clojure.contrib.datalog.tests.test-rules) | |
(require 'clojure.contrib.datalog.tests.test-softstrat) | |
(require 'clojure.contrib.datalog.tests.test-util) | |
(require 'clojure.contrib.mock.test-adapter) | |
(require 'clojure.contrib.pprint.test-cl-format) | |
(require 'clojure.contrib.pprint.test-helper) |
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
(deftest symbol-test | |
(defsymbolmacro sum-2-3 (plus 2 3)) | |
(is (= (macroexpand '(with-symbol-macros (+ 1 sum-2-3))) | |
'(do (+ 1 (plus 2 3))))) | |
(is (= (macroexpand '(macrolet [(plus [a b] `(+ ~a ~b))] (+ 1 sum-2-3))) | |
'(do (+ 1 (clojure.core/+ 2 3))))) | |
(ns-unmap *ns* 'sum-2-3)) |