package activejdbc;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;
import activejdbc.validation.AttributePresenceValidator;

public class ErrorsTest {

	Errors errors;
	
	@Before
	public void before() { 
		errors = new Errors();
		errors.addValidator("name", new AttributePresenceValidator("name"));
		errors.addValidator("description", new AttributePresenceValidator("description"));
	}
	
	@Test
	public void shouldReturnCollectionsWithAllValuesOfTheErrors() { 
		Collection<String> expected = new ArrayList<String>(Arrays.asList("value is missing","value is missing"));
		assertEquals(expected, errors.values());
	}
}

@@ -612,30 +612,8 @@
 d = 
-new ArrayList%3CString%3E(
 Arra
@@ -660,17 +660,16 @@
 issing%22)
-)
 ;%0A%09%09asse

removing redundant code