package org.realityforge.replicant.client;

import org.realityforge.replicant.client.transport.TestGraph;
import org.testng.annotations.Test;
import static org.testng.Assert.*;

public class ChannelDescriptorTest
{
  @SuppressWarnings( "EqualsWithItself" )
  @Test
  public void basicOperation()
  {
    final ChannelDescriptor descriptor1 = new ChannelDescriptor( TestGraph.A );
    final ChannelDescriptor descriptor2 = new ChannelDescriptor( TestGraph.B, 1 );

    assertEquals( descriptor1.getSystem(), TestGraph.class );
    assertEquals( descriptor1.getGraph(), TestGraph.A );
    assertEquals( descriptor1.getID(), null );
    assertEquals( descriptor1.toString(), "A" );
    assertEquals( descriptor1.equals( descriptor1 ), true );
    assertEquals( descriptor1.equals( descriptor2 ), false );

    assertEquals( descriptor2.getSystem(), TestGraph.class );
    assertEquals( descriptor2.getGraph(), TestGraph.B );
    assertEquals( descriptor2.getID(), 1 );
    assertEquals( descriptor2.toString(), "B:1" );
    assertEquals( descriptor2.equals( descriptor1 ), false );
    assertEquals( descriptor2.equals( descriptor2 ), true );
  }
}

@@ -666,16 +666,26 @@
 ing(), %22
+TestGraph.
 A%22 );%0A  
@@ -1012,16 +1012,26 @@
 ing(), %22
+TestGraph.
 B:1%22 );%0A

Fix tests