Fix test
This commit is contained in:
parent
678e47dc1a
commit
6082ac9c9e
|
@ -1,11 +1,12 @@
|
||||||
package com.baeldung.file;
|
package com.baeldung.file;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import org.apache.commons.io.FileUtils;
|
||||||
import java.io.File;
|
import org.hamcrest.CoreMatchers;
|
||||||
import java.io.FileInputStream;
|
import org.hamcrest.Matchers;
|
||||||
import java.io.IOException;
|
import org.junit.Assert;
|
||||||
import java.io.InputStream;
|
import org.junit.Test;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
|
import java.io.*;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
@ -14,12 +15,6 @@ import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.hamcrest.CoreMatchers;
|
|
||||||
import org.hamcrest.Matchers;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class FileOperationsUnitTest {
|
public class FileOperationsUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -58,9 +53,9 @@ public class FileOperationsUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenURLName_whenUsingURL_thenFileData() throws IOException {
|
public void givenURLName_whenUsingURL_thenFileData() throws IOException {
|
||||||
String expectedData = "Baeldung";
|
String expectedData = "Example Domain";
|
||||||
|
|
||||||
URL urlObject = new URL("http://www.baeldung.com/");
|
URL urlObject = new URL("http://www.example.com/");
|
||||||
|
|
||||||
URLConnection urlConnection = urlObject.openConnection();
|
URLConnection urlConnection = urlObject.openConnection();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue