Skip to content
Permalink
Browse files
MIME4J-270 Using "alternative" as default subtype.
  • Loading branch information
dmak committed May 22, 2018
1 parent eb68dd5 commit c33617db27d2c31825946706c91843f3cfbadce5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
@@ -66,6 +66,7 @@ public static MultipartBuilder create() {
private MultipartBuilder() {
this.bodyParts = new LinkedList<Entity>();
this.parameters = new LinkedList<NameValuePair>();
this.subType = "alternative"; // the default value; see getSubType() JavaDoc
}

public MultipartBuilder use(final BodyFactory bodyFactory) {
@@ -39,7 +39,17 @@
public class MultipartBuilderTest {

@Test
public void testBasis() throws Exception {
public void testDefaults() {
MultipartBuilder builder = MultipartBuilder.create();

Assert.assertEquals("alternative", builder.getSubType());
Assert.assertNull(builder.getPreamble());
Assert.assertNull(builder.getEpilogue());
Assert.assertEquals(0, builder.getCount());
}

@Test
public void testBasis() {
MultipartBuilder builder = MultipartBuilder.create("stuff");
builder.setPreamble("Hello");
builder.setEpilogue("Bye");

0 comments on commit c33617d

Please sign in to comment.