!str split Framing into javadsl and scaladsl
This commit is contained in:
parent
5d3a8256c1
commit
c25e0abab6
14 changed files with 178 additions and 23 deletions
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (C) 2015-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
*/
|
||||
package akka.stream.javadsl;
|
||||
|
||||
import akka.NotUsed;
|
||||
import akka.stream.StreamTest;
|
||||
import akka.stream.testkit.AkkaSpec;
|
||||
import akka.util.ByteString;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
public class FramingTest extends StreamTest {
|
||||
public FramingTest() {
|
||||
super(actorSystemResource);
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static AkkaJUnitActorSystemResource actorSystemResource =
|
||||
new AkkaJUnitActorSystemResource("FramingTest", AkkaSpec.testConf());
|
||||
|
||||
@Test
|
||||
public void mustBeAbleToUseFraming() throws Exception {
|
||||
final Source<ByteString, NotUsed> in = Source.single(ByteString.fromString("1,3,4,5"));
|
||||
in.via(Framing.delimiter(ByteString.fromString(","), Integer.MAX_VALUE, FramingTruncation.ALLOW))
|
||||
.runWith(Sink.ignore(), materializer);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue