Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for testGetInputStream (0.53 sec)

  1. compat/maven-builder-support/src/test/java/org/apache/maven/building/StringSourceTest.java

    import java.io.InputStream;
    import java.util.Scanner;
    
    import org.junit.jupiter.api.Test;
    
    import static org.junit.jupiter.api.Assertions.assertEquals;
    
    class StringSourceTest {
        @Test
        void testGetInputStream() throws Exception {
            StringSource source = new StringSource("Hello World!");
    
            try (InputStream is = source.getInputStream();
                    Scanner scanner = new Scanner(is)) {
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. compat/maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java

                    NullPointerException.class, () -> new UrlSource(null), "Should fail, since you must specify a url");
            assertEquals("url cannot be null", e.getMessage());
        }
    
        @Test
        void testGetInputStream() throws Exception {
            URL txtFile = new File("target/test-classes/source.txt").toURI().toURL();
            UrlSource source = new UrlSource(txtFile);
            try (InputStream is = source.getInputStream();
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. compat/maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java

                    () -> new FileSource((File) null),
                    "Should fail, since you must specify a file");
            assertEquals("file cannot be null", e.getMessage());
        }
    
        @Test
        void testGetInputStream() throws Exception {
            File txtFile = new File("target/test-classes/source.txt");
            FileSource source = new FileSource(txtFile);
    
            try (InputStream is = source.getInputStream();
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/SmbPipeHandleTest.java

        }
    
        /**
         * Tests that the getter for the input stream returns the correct stream.
         * @throws CIFSException if an error occurs while getting the stream.
         */
        @Test
        public void testGetInputStream() throws CIFSException {
            assertEquals(mockInputStream, smbPipeHandle.getInput(), "getInput() should return the correct input stream.");
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbFileTest.java

                doReturn(mockFileHandle).when(smbFile).openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt());
            }
    
            @Test
            void testGetInputStream() throws IOException {
                // Act
                var inputStream = smbFile.getInputStream();
    
                // Assert
                assertNotNull(inputStream);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
Back to top