@@ -0,0 +1,2173 @@
+package com.basgeekball.awesomevalidation;%0A%0Aimport android.text.Editable;%0Aimport android.widget.EditText;%0A%0Aimport com.basgeekball.awesomevalidation.model.NumericRange;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport org.junit.runner.RunWith;%0Aimport org.powermock.api.easymock.PowerMock;%0Aimport org.powermock.core.classloader.annotations.PrepareForTest;%0Aimport org.powermock.modules.junit4.PowerMockRunner;%0A%0Aimport java.util.regex.Pattern;%0A%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0A@RunWith(PowerMockRunner.class)%0A@PrepareForTest(ValidationHolder.class)%0Apublic class ValidationHolderTest extends TestCase %7B%0A%0A    private EditText mMockedEditText;%0A    private ValidationHolder mValidationHolderRegexType;%0A    private ValidationHolder mValidationHolderRangeType;%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A        mMockedEditText = mock(EditText.class);%0A        Pattern mockedPattern = PowerMock.createMock(Pattern.class);%0A        NumericRange mockedNumericRange = mock(NumericRange.class);%0A        String mockedErrMsg = PowerMock.createMock(String.class);%0A        mValidationHolderRegexType = new ValidationHolder(mMockedEditText, mockedPattern, mockedErrMsg);%0A        mValidationHolderRangeType = new ValidationHolder(mMockedEditText, mockedNumericRange, mockedErrMsg);%0A    %7D%0A%0A    public void testIsRegexTypeTrue() %7B%0A        assertTrue(mValidationHolderRegexType.isRegexType());%0A    %7D%0A%0A    public void testIsRegexTypeFalse() %7B%0A        assertFalse(mValidationHolderRangeType.isRegexType());%0A    %7D%0A%0A    public void testIsRangeTypeTrue() %7B%0A        assertTrue(mValidationHolderRangeType.isRangeType());%0A    %7D%0A%0A    public void testIsRangeTypeFalse() %7B%0A        assertFalse(mValidationHolderRegexType.isRangeType());%0A    %7D%0A%0A    public void testGetText() %7B%0A        String text = %22OK%22;%0A        Editable mockedEditable = mock(Editable.class);%0A        when(mMockedEditText.getText()).thenReturn(mockedEditable);%0A        when(mockedEditable.toString()).thenReturn(text);%0A        assertEquals(text, mValidationHolderRegexType.getText());%0A        assertEquals(text, mValidationHolderRangeType.getText());%0A    %7D%0A%0A%7D%0A

Add tests for ValidationHolder