Source:
public final void testLocalSdkTest_getPkgInfo_Tools ( ) { assertNull ( mLS.getPkgInfo ( LocalSdk.PKG_TOOLS ) ) ; mLS.clearLocalPkg ( LocalSdk.PKG_ALL ) ; mFOp.recordExistingFolder ( "/sdk/tools" ) ; mFOp.recordExistingFile ( "/sdk/tools/source.properties" , ( "Pkg.License=Terms and Conditions\n" + ( ( ( ( ( "Archive.Os=WINDOWS\n" + "Pkg.Revision=22.3.4\n" ) + "Platform.MinPlatformToolsRev=18\n" ) + "Pkg.LicenseRef=android-sdk-license\n" ) + "Archive.Arch=ANY\n" ) + "Pkg.SourceUrl=https\\://dl-ssl.google.com/android/repository/repository-8.xml" ) ) ) ; mFOp.recordExistingFile ( ( "/sdk/tools/" + ( com.android.SdkConstants.androidCmdName ( ) ) ) , "placeholder" ) ; mFOp.recordExistingFile ( ( "/sdk/tools/" + ( com.android.SdkConstants.FN_EMULATOR ) ) , "placeholder" ) ; com.android.sdklib.repository.local.LocalPkgInfo pi = mLS.getPkgInfo ( LocalSdk.PKG_TOOLS ) ; assertNotNull ( pi ) ; assertTrue ( ( pi instanceof com.android.sdklib.repository.local.LocalToolPkgInfo ) ) ; assertEquals ( new java.io.File ( "/sdk/tools" ) , pi.getLocalDir ( ) ) ; assertSame ( mLS , pi.getLocalSdk ( ) ) ; assertEquals ( null , pi.getLoadError ( ) ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 22 , 3 , 4 ) , pi.getFullRevision ( ) ) ; assertEquals ( "<LocalToolPkgInfo FullRev=22.3.4>" , pi.toString ( ) ) ; java.lang.Package pkg = pi.getPackage ( ) ; assertNotNull ( pkg ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 22 , 3 , 4 ) , pkg.getRevision ( ) ) ; assertEquals ( "Android SDK Tools, revision 22.3.4" , pkg.getShortDescription ( ) ) ; assertTrue ( pkg.isLocal ( ) ) ; com.android.sdklib.internal.repository.archives.Archive a = pkg.getArchives ( ) [ 0 ] ; assertTrue ( a.isLocal ( ) ) ; assertEquals ( "/sdk/tools" , mFOp.getAgnosticAbsPath ( a.getLocalOsPath ( ) ) ) ; }

Target:
public final void testLocalSdkTest_getPkgInfo_Tools ( ) { assertNull ( mLS.getPkgInfo ( PkgType.PKG_TOOLS ) ) ; mLS.clearLocalPkg ( PkgType.PKG_ALL ) ; mFOp.recordExistingFolder ( "/sdk/tools" ) ; mFOp.recordExistingFile ( "/sdk/tools/source.properties" , ( "Pkg.License=Terms and Conditions\n" + ( ( ( ( ( "Archive.Os=WINDOWS\n" + "Pkg.Revision=22.3.4\n" ) + "Platform.MinPlatformToolsRev=18\n" ) + "Pkg.LicenseRef=android-sdk-license\n" ) + "Archive.Arch=ANY\n" ) + "Pkg.SourceUrl=https\\://dl-ssl.google.com/android/repository/repository-8.xml" ) ) ) ; mFOp.recordExistingFile ( ( "/sdk/tools/" + ( com.android.SdkConstants.androidCmdName ( ) ) ) , "placeholder" ) ; mFOp.recordExistingFile ( ( "/sdk/tools/" + ( com.android.SdkConstants.FN_EMULATOR ) ) , "placeholder" ) ; com.android.sdklib.repository.local.LocalPkgInfo pi = mLS.getPkgInfo ( PkgType.PKG_TOOLS ) ; assertNotNull ( pi ) ; assertTrue ( ( pi instanceof com.android.sdklib.repository.local.LocalToolPkgInfo ) ) ; assertEquals ( new java.io.File ( "/sdk/tools" ) , pi.getLocalDir ( ) ) ; assertSame ( mLS , pi.getLocalSdk ( ) ) ; assertEquals ( null , pi.getLoadError ( ) ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 22 , 3 , 4 ) , pi.getDesc ( ) . getFullRevision ( ) ) ; assertEquals ( "<LocalToolPkgInfo:PkgDesc FullRev=22.3.4 MinPlatToolsRev=18.0.0>" , pi.toString ( ) ) ; java.lang.Package pkg = pi.getPackage ( ) ; assertNotNull ( pkg ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 22 , 3 , 4 ) , pkg.getRevision ( ) ) ; assertEquals ( "Android SDK Tools, revision 22.3.4" , pkg.getShortDescription ( ) ) ; assertTrue ( pkg.isLocal ( ) ) ; com.android.sdklib.internal.repository.archives.Archive a = pkg.getArchives ( ) [ 0 ] ; assertTrue ( a.isLocal ( ) ) ; assertEquals ( "/sdk/tools" , mFOp.getAgnosticAbsPath ( a.getLocalOsPath ( ) ) ) ; }