package Ġchecks Ċ Ċ import Ġorg . junit . Test Ċ import Ġjava . text . SimpleDateFormat Ċ Ċ class ĠList Tests Ġ{ ĊĠĠĠ Ġprivate Ġval Ġboolean List Values Ġ= ĠlistOf ( true ) ĊĠĠĠ Ġprivate Ġval Ġboolean Other List Values Ġ= ĠlistOf ( false ) ĊĠĠĠ Ġprivate Ġval Ġboolean In List Check Ġ= ĠIn List ( boolean List Values ) ĊĠĠĠ Ġprivate Ġval Ġboolean NotIn List Check Ġ= ĠNot In List ( boolean List Values ) ĊĊĠĠĠ Ġprivate Ġval ĠdateFormat Ġ= ĠSimpleDateFormat (" MM / dd / yyyy ") ĊĠĠĠ Ġprivate Ġval Ġdate List Values Ġ= ĠlistOf ( date Format . parse (" 0 1 / 0 1 / 1 9 3 8 "), ĠdateFormat . parse (" 0 3 / 2 4 / 2 7 8 3 ")) ĊĠĠĠ Ġprivate Ġval Ġdate Other List Values Ġ= ĠlistOf ( date Format . parse (" 0 1 / 0 2 / 1 9 3 8 "), ĠdateFormat . parse (" 0 4 / 2 4 / 2 7 8 3 ")) ĊĠĠĠ Ġprivate Ġval Ġdate In List Check Ġ= ĠIn List ( date List Values ) ĊĠĠĠ Ġprivate Ġval Ġdate NotIn List Check Ġ= ĠNot In List ( date List Values ) ĊĊĠĠĠ Ġprivate Ġval Ġdouble List Values Ġ= ĠlistOf ( 1 . 0 , Ġ 2 . 0 , Ġ 3 . 0 , Ġ 4 . 0 ) ĊĠĠĠ Ġprivate Ġval Ġdouble Other List Values Ġ= ĠlistOf ( 0 . 5 , Ġ 1 . 5 , Ġ 2 . 5 , Ġ 3 . 5 , Ġ 4 . 5 ) ĊĠĠĠ Ġprivate Ġval Ġdouble In List Check Ġ= ĠIn List ( double List Values ) ĊĠĠĠ Ġprivate Ġval Ġdouble NotIn List Check Ġ= ĠNot In List ( double List Values ) ĊĊĠĠĠ Ġprivate Ġval Ġint List Values Ġ= ĠlistOf ( 1 , 3 , 5 , 7 , 9 ) ĊĠĠĠ Ġprivate Ġval Ġint Other List Values Ġ= ĠlistOf ( 0 , 2 , 4 , 6 , 8 , 1 0 ) ĊĠĠĠ Ġprivate Ġval Ġint In List Check Ġ= ĠIn List ( int List Values ) ĊĠĠĠ Ġprivate Ġval Ġint NotIn List Check Ġ= ĠNot In List ( int List Values ) ĊĊĠĠĠ Ġprivate Ġval Ġlong List Values Ġ= ĠlistOf < Long >( 1 , 3 , 5 , 7 , 9 ) ĊĠĠĠ Ġprivate Ġval Ġlong Other List Values Ġ= ĠlistOf < Long >( 0 , 2 , 4 , 6 , 8 , 1 0 ) ĊĠĠĠ Ġprivate Ġval Ġlong In List Check Ġ= ĠIn List ( long List Values ) ĊĠĠĠ Ġprivate Ġval Ġlong NotIn List Check Ġ= ĠNot In List ( long List Values ) ĊĊĠĠĠ Ġprivate Ġval Ġstring List Values Ġ= ĠlistOf (" This ", Ġ" Library ", Ġ" Valid ates ", Ġ" Stuff ") ĊĠĠĠ Ġprivate Ġval Ġstring Other List Values Ġ= ĠlistOf (" It ", Ġ" Will ", Ġ" Also ", Ġ" Validate ", Ġ" Things ") ĊĠĠĠ Ġprivate Ġval Ġstring In List Check Ġ= ĠIn List ( string List Values ) ĊĠĠĠ Ġprivate Ġval Ġstring NotIn List Check Ġ= ĠNot In List ( string List Values ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġlist Values Are Valid For In List Check () Ġ{ ĊĠĠĠĠĠĠĠ Ġassert ( this . boolean List Values . none ( this . boolean In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . date List Values . none ( this . date In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . double List Values . none ( this . double In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . int List Values . none ( this . int In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . long List Values . none ( this . long In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . string List Values . none ( this . string In List Check :: fails )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġlist Values Are Invalid For NotIn List Check () Ġ{ ĊĠĠĠĠĠĠĠ Ġassert ( this . boolean List Values . all ( this . boolean NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . date List Values . all ( this . date NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . double List Values . all ( this . double NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . int List Values . all ( this . int NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . long List Values . all ( this . long NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . string List Values . all ( this . string NotIn List Check :: fails )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġother Values Are Invalid For In List Check () Ġ{ ĊĠĠĠĠĠĠĠ Ġassert ( this . boolean Other List Values . all ( this . boolean In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . date Other List Values . all ( this . date In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . double Other List Values . all ( this . double In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . int Other List Values . all ( this . int In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . long Other List Values . all ( this . long In List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . string Other List Values . all ( this . string In List Check :: fails )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġother Values Are Valid For NotIn List Check () Ġ{ ĊĠĠĠĠĠĠĠ Ġassert ( this . boolean Other List Values . none ( this . boolean NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . date Other List Values . none ( this . date NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . double Other List Values . none ( this . double NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . int Other List Values . none ( this . int NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . long Other List Values . none ( this . long NotIn List Check :: fails )) ĊĠĠĠĠĠĠĠ Ġassert ( this . string Other List Values . none ( this . string NotIn List Check :: fails )) ĊĠĠĠ Ġ} Ċ }