mil.dod.th.ose.jaxb.proto.converter/test/mil/dod/th/ose/jaxbprotoconverter/TestPathUtils.java
@Test
    public void testGetRelativePath()
    {
        File file = mock(File.class);
        File baseDir = mock(File.class);
        Path filePath = mock(Path.class);
        Path baseDirPath = mock(Path.class);
        Path relativePath = mock(Path.class);
        
        when(file.toPath()).thenReturn(filePath);
        when(baseDir.toPath()).thenReturn(baseDirPath);
        when(baseDirPath.relativize(filePath)).thenReturn(relativePath);
        
        assertThat(PathUtils.getRelativePath(file, baseDir), is(relativePath));
    }
/**
     * Verify that the appropriate path is returned by the get relative path method.
     */
Verify that the appropriate path is returned by the get relative path method.
Verify that the appropriate path is returned by the get relative path method .
@Test
    public void testGetRelativePath()
    {
        File file = mock(File.class);
        File baseDir = mock(File.class);
        Path filePath = mock(Path.class);
        Path baseDirPath = mock(Path.class);
        Path relativePath = mock(Path.class);
        when(file.toPath()).thenReturn(filePath);
        when(baseDir.toPath()).thenReturn(baseDirPath);
        when(baseDirPath.relativize(filePath)).thenReturn(relativePath);
        assertThat(PathUtils.getRelativePath(file, baseDir), is(relativePath));
    }
@ Test public void testGetRelativePath ( ) { File file = mock ( File . class ) ; File baseDir = mock ( File . class ) ; Path filePath = mock ( Path . class ) ; Path baseDirPath = mock ( Path . class ) ; Path relativePath = mock ( Path . class ) ; when ( file . toPath ( ) ) . thenReturn ( filePath ) ; when ( baseDir . toPath ( ) ) . thenReturn ( baseDirPath ) ; when ( baseDirPath . relativize ( filePath ) ) . thenReturn ( relativePath ) ; assertThat ( PathUtils . getRelativePath ( file , baseDir ) , is ( relativePath ) ) ; }
Verify that the appropriate path is returned by the get relative path method.
Verify that the appropriate path is returned by the get relative path method .