summaryrefslogtreecommitdiffstats
path: root/simple/simple-http/src/test/java/org/simpleframework/http/core/MockPart.java
blob: 614a7aa8757e9f223daab32d017262b4c232e6c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package org.simpleframework.http.core;

import java.io.IOException;

import org.simpleframework.http.ContentDisposition;
import org.simpleframework.http.ContentType;
import org.simpleframework.http.Part;
import org.simpleframework.http.message.MockBody;

public class MockPart extends MockBody implements Part {

   private String name;
   private boolean file;
   
   public MockPart(String name, String body, boolean file) {
      super(body);    
      this.file = file;
      this.name = name;
   }

   public String getContent() throws IOException {      
      return body;
   }

   public ContentType getContentType() {     
      return null;
   }

   public ContentDisposition getDisposition() {      
      return null;
   }

   public String getHeader(String name) {
      return null;
   }

   public String getName() {     
      return name;
   }

   public boolean isFile() {     
      return file;
   }

   public String getFileName() {
      return null;
   }

}