BAEL-4088: clean-up.
This commit is contained in:
parent
012f903fe3
commit
15535cf0cf
|
@ -14,6 +14,11 @@
|
|||
<relativePath>../parent-spring-5</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<junit.version>4.12</junit.version>
|
||||
<org.springframework.spring-mock.version>2.0.8</org.springframework.spring-mock.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
@ -23,13 +28,13 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-mock</artifactId>
|
||||
<version>2.0.8</version>
|
||||
<version>${org.springframework.spring-mock.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -12,6 +12,11 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
|
||||
public class ConvertMultipartFileExample {
|
||||
|
||||
/**
|
||||
* Example of converting a {@link MultipartFile} to a {@link File} using {@link MultipartFile#getBytes()}.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
public void whenGetBytes_thenOK() throws IOException {
|
||||
MultipartFile multipartFile = new MockMultipartFile("sourceFile.tmp", "Hello World".getBytes());
|
||||
|
@ -25,6 +30,11 @@ public class ConvertMultipartFileExample {
|
|||
os.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Example of converting a {@link MultipartFile} to a {@link File} using {@link MultipartFile#getInputStream()}.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
public void whenGetInputStream_thenOK() throws IOException {
|
||||
MultipartFile multipartFile = new MockMultipartFile("sourceFile.tmp", "Hello World".getBytes());
|
||||
|
@ -40,6 +50,11 @@ public class ConvertMultipartFileExample {
|
|||
outStream.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Example of converting a {@link MultipartFile} to a {@link File} using {@link MultipartFile#transferTo(File)}.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
public void whenTransferTo_thenOK() throws IllegalStateException, IOException {
|
||||
MultipartFile multipartFile = new MockMultipartFile("sourceFile.tmp", "Hello World".getBytes());
|
||||
|
|
Loading…
Reference in New Issue