// Path: src/main/java/cz/sigler/android/aavalidation/ValidatingModel.java
// public abstract class ValidatingModel extends Model implements IValidatingModel {
// 
// 	/** List of errors from last validation. */
// 	private List<ValidationError> errors = new LinkedList<ValidationError>();
// 
// 	/**
// 	 * {@inheritDoc }
// 	 */
// 	@Override
// 	public List<ValidationError> getErrors() {
// 		return new LinkedList<ValidationError>(errors);
// 	}
// 
// 	/**
// 	 * {@inheritDoc }
// 	 */
// 	@Override
// 	public boolean isValid() {
// 		ValidationExecutor executor = new ValidationExecutor(this);
// 		errors = executor.execute();
// 
// 		return errors.isEmpty();
// 	}
// 
// 	/**
// 	 * {@inheritDoc }
// 	 */
// 	@Override
// 	public void saveOrThrow() throws ValidationException {		
// 		if (isValid()) {
// 			save();
// 		} else {			
// 			throw new ValidationException(getErrors());
// 		}
// 	}
// }


import static org.junit.Assert.*;
import com.activeandroid.annotation.Column;
import cz.sigler.android.aavalidation.ValidatingModel;
import cz.sigler.android.aavalidation.rule.Min;
import java.math.BigDecimal;
import org.junit.Test;

	/**
	 * Check decimal comparison - negative case.
	 */
	@Test
	public void testNegativeDecimalComparison() {
		TestModel model = new TestModel();
		model.setField1(Integer.MAX_VALUE);
		model.setField3(new BigDecimal(9.45d));

		assertFalse(model.isValid());
		assertError(COLUMN_NAME3, ERROR_MESSAGE3, model.getErrors());
	}

	/**
	 * Check decimal comparison - positive case.
	 */
	@Test
	public void testPositiveDecimalComparison() {
		TestModel model = new TestModel();
		model.setField1(Integer.MAX_VALUE);
		model.setField3(new BigDecimal(19.45d));

		assertTrue(model.isValid());
		assertTrue(model.getErrors().isEmpty());
	}

	/**
	 * Testing model.
	 */
// Path: src/main/java/cz/sigler/android/aavalidation/ValidatingModel.java
// public abstract class ValidatingModel extends Model implements IValidatingModel {
// 
// 	/** List of errors from last validation. */
// 	private List<ValidationError> errors = new LinkedList<ValidationError>();
// 
// 	/**
// 	 * {@inheritDoc }
// 	 */
// 	@Override
// 	public List<ValidationError> getErrors() {
// 		return new LinkedList<ValidationError>(errors);
// 	}
// 
// 	/**
// 	 * {@inheritDoc }
// 	 */
// 	@Override
// 	public boolean isValid() {
// 		ValidationExecutor executor = new ValidationExecutor(this);
// 		errors = executor.execute();
// 
// 		return errors.isEmpty();
// 	}
// 
// 	/**
// 	 * {@inheritDoc }
// 	 */
// 	@Override
// 	public void saveOrThrow() throws ValidationException {		
// 		if (isValid()) {
// 			save();
// 		} else {			
// 			throw new ValidationException(getErrors());
// 		}
// 	}
// }


// Path: src/test/java/cz/sigler/android/aavalidation/validator/MinValidatorTest.java
import static org.junit.Assert.*;
import com.activeandroid.annotation.Column;
import cz.sigler.android.aavalidation.ValidatingModel;
import cz.sigler.android.aavalidation.rule.Min;
import java.math.BigDecimal;
import org.junit.Test;


	/**
	 * Check decimal comparison - negative case.
	 */
	@Test
	public void testNegativeDecimalComparison() {
		TestModel model = new TestModel();
		model.setField1(Integer.MAX_VALUE);
		model.setField3(new BigDecimal(9.45d));

		assertFalse(model.isValid());
		assertError(COLUMN_NAME3, ERROR_MESSAGE3, model.getErrors());
	}

	/**
	 * Check decimal comparison - positive case.
	 */
	@Test
	public void testPositiveDecimalComparison() {
		TestModel model = new TestModel();
		model.setField1(Integer.MAX_VALUE);
		model.setField3(new BigDecimal(19.45d));

		assertTrue(model.isValid());
		assertTrue(model.getErrors().isEmpty());
	}

	/**
	 * Testing model.
	 */
	public static class TestModel extends ValidatingModel {