|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
/*
|
|
|
|
|
* The MIT License
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2013, benas (md.benhassine@gmail.com)
|
|
|
|
|
* Copyright (c) 2014, benas (md.benhassine@gmail.com)
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
@ -22,8 +22,9 @@
|
|
|
|
|
* THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package io.github.easyrules.core;
|
|
|
|
|
package io.github.io.github.benas.easyrules.core;
|
|
|
|
|
|
|
|
|
|
import io.github.benas.easyrules.core.BasicRule;
|
|
|
|
|
import org.junit.Before;
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
import static org.junit.Assert.*;
|
|
|
|
@ -45,13 +46,13 @@ public class RulePriorityComparisonTest {
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testDifferentRulePriorityComparison() {
|
|
|
|
|
assertEquals(-1,rule1.compareTo(rule2));
|
|
|
|
|
assertEquals(-1, rule1.compareTo(rule2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testSameRulePriorityComparison() {
|
|
|
|
|
rule1.setPriority(2);
|
|
|
|
|
assertEquals(0,rule1.compareTo(rule2));
|
|
|
|
|
assertEquals(0, rule1.compareTo(rule2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|