// ĠCopyright Ġ 2 0 0 0 - 2 0 1 8 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġorg . jetbrains . plugins . github . authentication . util Ċ Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ Ċ class ĠGithub Token Creator Ded up lication Test Ġ{ ĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Empty List () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf ()) ĊĠĠĠ ĠassertEquals ( 0 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Good List () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf (" test ", Ġ" test _ 1 ", Ġ" test _ 2 ")) ĊĠĠĠ ĠassertEquals ( 3 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Zero Conversion () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf (" test _ 1 ", Ġ" test _ 2 ")) ĊĠĠĠ ĠassertEquals ( 0 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Good List With Multiple Digits () Ġ{ ĊĠĠĠ Ġval Ġlist Ġ= Ġmutable ListOf (" test ") ĊĠĠĠ Ġfor Ġ( i Ġin Ġ 1 .. 9 9 ) ĊĠĠĠĠĠ Ġlist Ġ+= Ġ" test _$ i " ĊĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", Ġlist ) ĊĠĠĠ ĠassertEquals ( 1 0 0 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Good List With Different Case () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf (" TE st ", Ġ" t E St _ 1 ", Ġ" te ST _ 2 ")) ĊĠĠĠ ĠassertEquals ( 3 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Good List With Different Case Duplicates () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf (" TE st ", Ġ" t E St _ 1 ", Ġ" te ST _ 1 ", Ġ" Tes T _ 1 ", Ġ" test _ 2 ", Ġ" TEST _ 2 ")) ĊĠĠĠ ĠassertEquals ( 3 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Skip List () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf (" test ", Ġ" test _ 2 ")) ĊĠĠĠ ĠassertEquals ( 1 , Ġindex ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest List With Fault () Ġ{ ĊĠĠĠ Ġval Ġindex Ġ= ĠGithub Token Creator . find Next Ded up lication Index (" test ", ĠlistOf (" test ", Ġ" test Ġ_ 1 ")) ĊĠĠĠ ĠassertEquals ( 1 , Ġindex ) ĊĠ Ġ} Ċ }