Package com.pardot.rhombus

Source Code of com.pardot.rhombus.CIndexTest

package com.pardot.rhombus;

import com.pardot.rhombus.cobject.CField;
import com.pardot.rhombus.cobject.CIndex;
import com.pardot.rhombus.cobject.shardingstrategy.ShardingStrategyDaily;
import com.pardot.rhombus.cobject.shardingstrategy.ShardingStrategyMonthly;
import junit.framework.TestCase;

/**
* Pardot, An ExactTarget Company
* User: robrighter
* Date: 4/5/13
*/
public class CIndexTest extends TestCase{

  public void testEquals() {
    CIndex index1 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    CIndex index2 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    assertTrue(index1.equals(index2));
  }

  public void testNotEqualsKey() {
    CIndex index1 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    CIndex index2 = new CIndex("field1:field2:field4", new ShardingStrategyDaily());
    assertFalse(index1.equals(index2));
  }

  public void testNotEqualsShardingStrategy() {
    CIndex index1 = new CIndex("field1:field2:field3", new ShardingStrategyDaily());
    CIndex index2 = new CIndex("field1:field2:field3", new ShardingStrategyMonthly());
    assertFalse(index1.equals(index2));
  }
}
TOP

Related Classes of com.pardot.rhombus.CIndexTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.