// Path: src/main/java/org/pinae/rafiki/trigger/TriggerException.java
// public class TriggerException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public TriggerException() {
// 		super();
// 	}
// 
// 	public TriggerException(String message) {
// 		super(message);
// 	}
// 
// 	public TriggerException(Throwable cause) {
// 		super(cause);
// 	}
// 
// 	public TriggerException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// }


import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.junit.Test;
import org.pinae.rafiki.trigger.TriggerException;
package org.pinae.rafiki.trigger.impl;




public class MixedTriggerTest {

	@Test
	public void testMatch() throws ParseException, TriggerException {
		assertTrue(match("2014-06-10 13:00:10", MixedTrigger.OR));
		assertTrue(match("2014-05-15 12:00:00", MixedTrigger.OR));
		assertTrue(match("2014-05-15 12:00:40", MixedTrigger.OR));
		assertFalse(match("2014-05-16 10:00:00", MixedTrigger.OR));
		assertFalse(match("2014-05-04 10:00:00", MixedTrigger.OR));
		assertFalse(match("2014-05-10 10:00:15", MixedTrigger.OR));
		
		assertTrue(match("2014-05-15 12:00:00", MixedTrigger.AND));
		assertFalse(match("2014-05-15 12:00:40", MixedTrigger.AND));
		assertFalse(match("2014-06-10 13:00:10", MixedTrigger.AND));
	}
	
// Path: src/main/java/org/pinae/rafiki/trigger/TriggerException.java
// public class TriggerException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public TriggerException() {
// 		super();
// 	}
// 
// 	public TriggerException(String message) {
// 		super(message);
// 	}
// 
// 	public TriggerException(Throwable cause) {
// 		super(cause);
// 	}
// 
// 	public TriggerException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// }


// Path: src/test/java/org/pinae/rafiki/trigger/impl/MixedTriggerTest.java
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.junit.Test;
import org.pinae.rafiki.trigger.TriggerException;

package org.pinae.rafiki.trigger.impl;




public class MixedTriggerTest {

	@Test
	public void testMatch() throws ParseException, TriggerException {
		assertTrue(match("2014-06-10 13:00:10", MixedTrigger.OR));
		assertTrue(match("2014-05-15 12:00:00", MixedTrigger.OR));
		assertTrue(match("2014-05-15 12:00:40", MixedTrigger.OR));
		assertFalse(match("2014-05-16 10:00:00", MixedTrigger.OR));
		assertFalse(match("2014-05-04 10:00:00", MixedTrigger.OR));
		assertFalse(match("2014-05-10 10:00:15", MixedTrigger.OR));
		
		assertTrue(match("2014-05-15 12:00:00", MixedTrigger.AND));
		assertFalse(match("2014-05-15 12:00:40", MixedTrigger.AND));
		assertFalse(match("2014-06-10 13:00:10", MixedTrigger.AND));
	}
	
	private boolean match(String date, int operate) throws ParseException, TriggerException {