@@ -0,0 +1,2728 @@
+package com.github.brunodles.simplepreferences.lib.parsers;%0A%0Aimport android.content.SharedPreferences;%0Aimport android.test.suitebuilder.annotation.SmallTest;%0A%0Aimport com.github.brunodles.simplepreferences.lib.Property;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.lang.reflect.Field;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.times;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0A/**%0A * Created by bruno on 16/12/15.%0A */%0Apublic class BooleanParserTest %7B%0A%0A    public static class WhenHaveSavedValue %7B%0A        private BooleanParser booleanParser;%0A        private SharedPreferences preferences;%0A        private SampleObject object;%0A        private Field field;%0A%0A        @Before%0A        public void setup() throws NoSuchFieldException %7B%0A            booleanParser = new BooleanParser();%0A            preferences = mock(SharedPreferences.class);%0A            when(preferences.getBoolean(%22field%22, false)).thenReturn(true);%0A            object = new SampleObject();%0A            field = SampleObject.class.getField(%22field%22);%0A            field.setAccessible(true);%0A        %7D%0A%0A        @Test%0A        @SmallTest%0A        public void shouldReturnTheSavedValue() throws IllegalAccessException %7B%0A            booleanParser.load(preferences, field, object, field.getAnnotation(Property.class));%0A            assertEquals(%22Should be equals%22, true, object.field);%0A            verify(preferences, times(1)).getBoolean(%22field%22, false);%0A        %7D%0A%0A        private static class SampleObject %7B%0A            @Property public boolean field;%0A        %7D%0A    %7D%0A%0A    public static class WhenDontHaveSavedValueButHaveDefault %7B%0A        private BooleanParser stringParser;%0A        private SharedPreferences preferences;%0A        private SampleObject object;%0A        private Field field;%0A%0A        @Before%0A        public void setup() throws NoSuchFieldException %7B%0A            stringParser = new BooleanParser();%0A            preferences = mock(SharedPreferences.class);%0A            when(preferences.getBoolean(%22field%22, true)).thenReturn(true);%0A            object = new SampleObject();%0A            field = SampleObject.class.getField(%22field%22);%0A            field.setAccessible(true);%0A        %7D%0A%0A        @Test%0A        @SmallTest%0A        public void shouldReturnTheDefaultValue() throws IllegalAccessException %7B%0A            stringParser.load(preferences, field, object, field.getAnnotation(Property.class));%0A            assertEquals(true, object.field);%0A            verify(preferences, times(1)).getBoolean(%22field%22, true);%0A        %7D%0A%0A        private static class SampleObject %7B%0A            @Property public boolean field = true;%0A        %7D%0A    %7D%0A%7D

Add Test for booleanParserTest