@ -44,7 +44,8 @@
package org.eclipse.jgit.transport ;
package org.eclipse.jgit.transport ;
import static org.junit.Assert.assertEquals ;
import static org.junit.Assert.assertEquals ;
import static org.junit.Assert.assertNotSame ;
import static org.junit.Assert.assertFalse ;
import static org.junit.Assert.assertTrue ;
import static org.junit.Assert.assertSame ;
import static org.junit.Assert.assertSame ;
import static org.junit.Assert.fail ;
import static org.junit.Assert.fail ;
@ -142,21 +143,21 @@ public class PacketLineInTest {
init ( "0004" ) ;
init ( "0004" ) ;
final String act = in . readString ( ) ;
final String act = in . readString ( ) ;
assertEquals ( "" , act ) ;
assertEquals ( "" , act ) ;
assertNotSam e ( PacketLineIn . END , act ) ;
assertFals e ( PacketLineIn . isEnd ( act ) ) ;
assertEOF ( ) ;
assertEOF ( ) ;
}
}
@Test
@Test
public void testReadString_End ( ) throws IOException {
public void testReadString_End ( ) throws IOException {
init ( "0000" ) ;
init ( "0000" ) ;
assertSam e ( PacketLineIn . END , in . readString ( ) ) ;
assertTru e ( PacketLineIn . isEnd ( in . readString ( ) ) ) ;
assertEOF ( ) ;
assertEOF ( ) ;
}
}
@Test
@Test
public void testReadString_Delim ( ) throws IOException {
public void testReadString_Delim ( ) throws IOException {
init ( "0001" ) ;
init ( "0001" ) ;
assertSam e ( PacketLineIn . DELIM , in . readString ( ) ) ;
assertTru e ( PacketLineIn . isDelim ( in . readString ( ) ) ) ;
assertEOF ( ) ;
assertEOF ( ) ;
}
}
@ -183,14 +184,14 @@ public class PacketLineInTest {
init ( "0004" ) ;
init ( "0004" ) ;
final String act = in . readStringRaw ( ) ;
final String act = in . readStringRaw ( ) ;
assertEquals ( "" , act ) ;
assertEquals ( "" , act ) ;
assertNotSam e ( PacketLineIn . END , act ) ;
assertFals e ( PacketLineIn . isEnd ( act ) ) ;
assertEOF ( ) ;
assertEOF ( ) ;
}
}
@Test
@Test
public void testReadStringRaw_End ( ) throws IOException {
public void testReadStringRaw_End ( ) throws IOException {
init ( "0000" ) ;
init ( "0000" ) ;
assertSam e ( PacketLineIn . END , in . readStringRaw ( ) ) ;
assertTru e ( PacketLineIn . isEnd ( in . readString ( ) ) ) ;
assertEOF ( ) ;
assertEOF ( ) ;
}
}