Package org.timerescue.test

Source Code of org.timerescue.test.CoordinateTest

/**
*
*/
package org.timerescue.test;

import static org.junit.Assert.*;

import org.junit.Test;
import org.timerescue.action.ExecutionContext;
import org.timerescue.element.Coordinate;
import org.timerescue.exception.InvalidSerialException;

/**
* @author chamanx
*
*/
public class CoordinateTest {

  /**
   * Test method for {@link org.timerescue.element.Coordinate#fromSerial(java.lang.String)}.
   */
  @Test
  public void testFromSerial() {
    Coordinate ec = new Coordinate(1, 2);
    Coordinate ec2 = new Coordinate(3, 4);
    try {
      String temp = ec.toSerial();
      ec2.fromSerial(temp);
    } catch (InvalidSerialException e) {
      fail(e.toString());
    }
    String temp1 = ec.toSerial();
    String temp2 = ec2.toSerial();
    assertArrayEquals(temp1.getBytes(), temp2.getBytes());   
  }

}
TOP

Related Classes of org.timerescue.test.CoordinateTest

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.