Skip to content

Instantly share code, notes, and snippets.

View Kotlin-Native's full-sized avatar

Pierre Liebsch Kotlin-Native

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable name="user" type="com.example.User"/>
</data>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:layout_width="wrap_content"
apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
dependencies {
classpath "com.android.tools.build:gradle:1.3.0-beta1"
classpath "com.android.databinding:dataBinder:1.0-rc1"
}
import static org.junit.Assert.assertEquals;
import java.lang.reflect.Method;
import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert;
import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.InvocationHandler;
assertThatNot(myObject).isBar();
assertThat(myObject).isBar();
assertThat(myObject, hasProperty("bar", is(true)));
assertThat(myObject.isBar(), is(true));
assertThat(myObject.getBar(), is(nullValue()));
assertThat(list, hasItem("baz"));