~elambert/gearmanij/gearman_java_library

« back to all changes in this revision

Viewing changes to test/org/gearman/common/PacketMagicTest.java

  • Committer: Eric Lambert
  • Date: 2009-07-10 03:56:00 UTC
  • Revision ID: eric.d.lambert@gmail.com-20090710035600-fy5ghxevm51b5lvm
started refactoring unused classes and tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 */
7
7
package org.gearman.common;
8
8
 
9
 
import static org.gearman.util.TestUtil.assertArraysEqual;
 
9
import java.util.Arrays;
 
10
 
10
11
import static org.junit.Assert.assertEquals;
11
12
import static org.junit.Assert.assertNotNull;
12
 
import org.gearman.common.PacketMagic;
 
13
import static org.junit.Assert.assertTrue;
13
14
import org.gearman.common.PacketMagic.BadMagicException;
14
15
import org.junit.Test;
15
16
 
20
21
    @Test
21
22
    public void testMagicBytes() {
22
23
        assertEquals(2, PacketMagic.values().length);
23
 
        assertArraysEqual(reqBytes, PacketMagic.REQ.toBytes());
24
 
        assertArraysEqual(resBytes, PacketMagic.RES.toBytes());
 
24
        assertTrue(Arrays.equals(reqBytes, PacketMagic.REQ.toBytes()));
 
25
        assertTrue(Arrays.equals(resBytes, PacketMagic.RES.toBytes()));
25
26
    }
26
27
 
27
28
    @Test