package com.github.pfichtner.core;

import static org.junit.Assert.assertNotNull;

import java.net.URI;

import org.junit.Ignore;
import org.junit.Test;

import com.github.pfichtner.ardulink.core.linkmanager.LinkManager;
import com.github.pfichtner.ardulink.core.linkmanager.LinkManager.Configurer;

@Ignore // ignored since jni load
public class PiLinkTest {

	@Test
	public void canCreateIstances() throws Exception {
		Configurer configurer = LinkManager.getInstance().getConfigurer(
				new URI("ardulink://raspberry"));
		assertNotNull(configurer.newLink());
	}

}

@@ -40,70 +40,46 @@
 ort 
-static org.junit.Assert.assertNotNull;%0A%0Aimport java.net.URI
+java.net.URI;%0A%0Aimport org.junit.Rule
 ;%0A
-%0A
 impo
@@ -91,22 +91,20 @@
 g.junit.
-Ignore
+Test
 ;%0Aimport
@@ -114,20 +114,39 @@
 g.junit.
-Test
+rules.ExpectedException
 ;%0A%0Aimpor
@@ -290,67 +290,106 @@
 r;%0A%0A
-@Ignore // ignored since jni load%0Apublic class PiLinkTest %7B
+public class PiLinkTest %7B%0A%0A%09@Rule%0A%09public ExpectedException exceptions = ExpectedException.none();
 %0A%0A%09@
@@ -411,45 +411,141 @@
 id c
-anC
 reat
-eI
+ingIn
 stance
-s() throws Exception %7B
+WillFailOnX86withUnsatisfiedLinkError()%0A%09%09%09throws Exception %7B%0A%09%09// TODO should do a Assume if we are on a raspi or not
 %0A%09%09C
@@ -652,22 +652,57 @@
 ;%0A%09%09
-assertNotNull(
+exceptions.expect(UnsatisfiedLinkError.class);%0A%09%09
 conf
@@ -717,17 +717,16 @@
 ewLink()
-)
 ;%0A%09%7D%0A%0A%7D%0A

test enabled