package Ġcom . w ix . cod io . file System Ċ Ċ import Ġorg . junit . Test Ċ import Ġjava . nio . file . Paths Ċ import Ġkotlin . test . assertEquals Ċ Ċ class ĠPaths Helper Test Ġ{ ĊĊĠĠĠ Ġprivate Ġfun Ġget Absolute ( basePath : ĠString , Ġrelative Path : ĠString ): ĠString Ġ= ĊĠĠĠĠĠĠĠ ĠPaths . get ( basePath , Ġrelative Path ). toString () ĊĊĠĠĠ Ġprivate Ġfun Ġget Relative ( basePath : ĠString , Ġabsolute Path : ĠString ): ĠString Ġ= ĊĠĠĠĠĠĠĠ ĠPaths . get ( basePath ). rel ativ ize ( Paths . get ( absolute Path )). toString () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest HelloWorld () Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠbasePath Ġ= Ġ"/ Users / el ad bo / Documents / Plugin With Java FX " ĊĠĠĠĠĠĠĠ Ġval Ġabsolute Path Ġ= Ġ"/ Users / el ad bo / Documents / Plugin With Java FX / src / main / java / HelloWorld . java " ĊĠĠĠĠĠĠĠ Ġval Ġrelative Path Ġ= Ġ" src / main / java / HelloWorld . java " ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative ( basePath , Ġabsolute Path ), Ġrelative Path ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Absolute ( basePath , Ġrelative Path ), Ġabsolute Path ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Relative To Absolute () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative ("/ tmp ", Ġ"/ tmp / a "), Ġ" a ") ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative ("/ tmp ", Ġ"/ tmp / a / b "), Ġ" a / b ") ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative ("/ tmp / a ", Ġ"/ tmp / a / b "), Ġ" b ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Relative To Relative () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative (" tmp ", Ġ" tmp / a "), Ġ" a ") ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative (" tmp ", Ġ" tmp / a / b "), Ġ" a / b ") ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Relative (" tmp / a ", Ġ" tmp / a / b "), Ġ" b ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Absolute () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Absolute ("/ tmp ", Ġ" a "), Ġ"/ tmp / a ") ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Absolute ("/ tmp ", Ġ" a / b "), Ġ"/ tmp / a / b ") ĊĠĠĠĠĠĠĠ ĠassertEquals ( get Absolute ("/ tmp / a ", Ġ" b "), Ġ"/ tmp / a / b ") ĊĠĠĠ Ġ} Ċ }