@@ -0,0 +1,2309 @@
+package no.ntnu.capgeminitest.binding.android;%0A%0Aimport static org.junit.Assert.*;%0Aimport static org.hamcrest.CoreMatchers.*;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport no.ntnu.capgeminitest.binding.android.propertyprovider.PropertyProviderFactory;%0Aimport no.ntnu.capgeminitest.data.Property;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport android.content.Context;%0Aimport android.util.AttributeSet;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0A%0Aimport com.xtremelabs.robolectric.RobolectricTestRunner;%0A%0A@RunWith(RobolectricTestRunner.class)%0Apublic class BindingFactoryTest %7B%0A    %0A    public class FakeViewFactory implements BindingFactory.ViewFactory %7B%0A        View view;%0A        %0A        public FakeViewFactory(View view) %7B%0A            this.view = view;%0A        %7D%0A%0A        @Override%0A        public final View createView(String unusedName, String unusedPrefix,%0A                AttributeSet unusedAttr) %7B%0A            return view;%0A        %7D%0A    %7D%0A    %0A    public class TestBindingFactory extends BindingFactory %7B%0A        TestBindingFactory(PropertyProviderFactory propertyProviderFactory,%0A                ViewFactory viewFactory) %7B%0A            super(propertyProviderFactory, viewFactory);%0A        %7D%0A        %0A        @Override%0A        protected Map%3CString, String%3E getBindingAttrs(AttributeSet unused) %7B%0A            Map%3CString, String%3E bindingAttrs = new HashMap%3CString, String%3E();%0A            bindingAttrs.put(%22OnClickTo%22, %22OnClickToTarget%22);%0A            return bindingAttrs;%0A        %7D%0A    %7D%0A    %0A    private View view;%0A    private FakeViewFactory viewFactory;%0A    private TestBindingFactory bindingFactory;%0A    %0A    @Before%0A    public void setUp() %7B%0A        view = new View(null);%0A        viewFactory = new FakeViewFactory(view);%0A        bindingFactory = new TestBindingFactory(PropertyProviderFactory.getDefaultFactory(),%0A                viewFactory);%0A    %7D%0A    %0A    @Test%0A    public void testOnClickProperty() %7B%0A        bindingFactory.onCreateView(%22View%22, null, null);%0A        Property%3C?%3E onClickProperty = bindingFactory.getBoundProperties()%0A                .get(%22OnClickToTarget%22);%0A        Object object1 = onClickProperty.get();%0A        view.performClick();%0A        assertThat(onClickProperty.get(), not(equalTo(object1)));%0A    %7D%0A%7D%0A

Add unit test of BindingFactory.