/external/android-mock/tests/com/google/android/testing/mocking/ |
D | SdkVersionTest.java | 29 List<SdkVersion> versions = Arrays.asList(SdkVersion.getAllVersions()); in testGetAllVersions() 30 List<SdkVersion> values = Arrays.asList(SdkVersion.values()); in testGetAllVersions() 33 assertFalse(versions.contains(SdkVersion.UNKNOWN)); in testGetAllVersions() 37 assertEquals("v15", SdkVersion.CUPCAKE.getVersionName()); in testGetVersionName() 38 assertEquals("v16", SdkVersion.DONUT.getVersionName()); in testGetVersionName() 39 assertEquals("v201", SdkVersion.ECLAIR_0_1.getVersionName()); in testGetVersionName() 40 assertEquals("v21", SdkVersion.ECLAIR_MR1.getVersionName()); in testGetVersionName() 41 assertEquals("v22", SdkVersion.FROYO.getVersionName()); in testGetVersionName() 42 assertEquals("v23", SdkVersion.GINGERBREAD.getVersionName()); in testGetVersionName() 43 assertEquals("", SdkVersion.UNKNOWN.getVersionName()); in testGetVersionName() [all …]
|
D | FileUtilsTest.java | 45 FileUtils.getInterfaceNameFor(Vector.class, SdkVersion.CUPCAKE)); in testGetInterfaceNameFor() 47 FileUtils.getInterfaceNameFor(Vector.class, SdkVersion.DONUT)); in testGetInterfaceNameFor() 49 FileUtils.getInterfaceNameFor(Vector.class, SdkVersion.ECLAIR_0_1)); in testGetInterfaceNameFor() 51 FileUtils.getInterfaceNameFor(Vector.class, SdkVersion.ECLAIR_MR1)); in testGetInterfaceNameFor() 53 FileUtils.getInterfaceNameFor(Vector.class, SdkVersion.FROYO)); in testGetInterfaceNameFor() 55 FileUtils.getInterfaceNameFor(Vector.class, SdkVersion.UNKNOWN)); in testGetInterfaceNameFor() 60 FileUtils.getSubclassNameFor(Vector.class, SdkVersion.CUPCAKE)); in testGetSubclassNameFor() 62 FileUtils.getSubclassNameFor(Vector.class, SdkVersion.DONUT)); in testGetSubclassNameFor() 64 FileUtils.getSubclassNameFor(Vector.class, SdkVersion.ECLAIR_0_1)); in testGetSubclassNameFor() 66 FileUtils.getSubclassNameFor(Vector.class, SdkVersion.ECLAIR_MR1)); in testGetSubclassNameFor() [all …]
|
D | AndroidMockGeneratorTest.java | 261 FileUtils.getInterfaceNameFor(Object.class, SdkVersion.UNKNOWN)); in testGetInterfaceName() 267 FileUtils.getSubclassNameFor(Object.class, SdkVersion.UNKNOWN)); in testGetSubclassName() 418 CtClass generatedInterface = mockGenerator.generateInterface(String.class, SdkVersion.UNKNOWN); in testGenerateEmptySubclass() 420 String.class, generatedInterface, SdkVersion.UNKNOWN); in testGenerateEmptySubclass() 430 CtClass generatedInterface = mockGenerator.generateInterface(Number.class, SdkVersion.UNKNOWN); in testAddMethods() 432 mockGenerator.generateSkeletalClass(Number.class, generatedInterface, SdkVersion.UNKNOWN); in testAddMethods() 444 CtClass generatedInterface = mockGenerator.generateInterface(Object.class, SdkVersion.UNKNOWN); in testAddMethodsObjectClass() 446 mockGenerator.generateSkeletalClass(Object.class, generatedInterface, SdkVersion.UNKNOWN); in testAddMethodsObjectClass() 459 BigInteger.class, SdkVersion.UNKNOWN); in testAddMethodsUsesSuperclass() 461 BigInteger.class, generatedInterface, SdkVersion.UNKNOWN); in testAddMethodsUsesSuperclass() [all …]
|
D | AndroidFrameworkMockGeneratorTest.java | 90 for (SdkVersion version : SdkVersion.getAllVersions()) { in testCreateMockForClass() 124 for (SdkVersion version : SdkVersion.getAllVersions()) { in testGetJarFileNameForVersion() 136 for (SdkVersion version : SdkVersion.getAllVersions()) { in testGetMocksForClass()
|
/external/android-mock/src/com/google/android/testing/mocking/ |
D | SdkVersion.java | 28 public enum SdkVersion { enum 58 private SdkVersion(String packagePrefix, int apiLevel) { in SdkVersion() method in SdkVersion 71 public static SdkVersion[] getAllVersions() { in getAllVersions() 72 List<SdkVersion> versions = new ArrayList<SdkVersion>(); in getAllVersions() 73 for (SdkVersion version : values()) { in getAllVersions() 78 return versions.toArray(new SdkVersion[versions.size()]); in getAllVersions() 94 public static SdkVersion getCurrentVersion() { in getCurrentVersion() 98 static SdkVersion getVersionFor(int apiLevel) { in getVersionFor() 99 for (SdkVersion version : values()) { in getVersionFor()
|
D | AndroidFrameworkMockGenerator.java | 78 SdkVersion[] versions = SdkVersion.getAllVersions(); in getPrebuiltClassesFor() 79 for (SdkVersion sdkVersion : versions) { in getPrebuiltClassesFor() 90 public List<GeneratedClassFile> createMocksForClass(Class<?> clazz, SdkVersion version) in createMocksForClass() 125 static String getJarFileNameForVersion(SdkVersion version) { in getJarFileNameForVersion() 137 SdkVersion version, JarFile jar) in generateMocks() 148 private static JarFile getJarFile(SdkVersion version) throws IOException { in getJarFile() 157 SdkVersion version = SdkVersion.getVersionFor(Integer.parseInt(args[1])); in main()
|
D | FileUtils.java | 33 static String getInterfaceNameFor(Class<?> clazz, SdkVersion sdkVersion) { in getInterfaceNameFor() 41 static String getSubclassNameFor(Class<?> clazz, SdkVersion sdkVersion) { in getSubclassNameFor()
|
D | AndroidMockGenerator.java | 88 return this.createMocksForClass(clazz, SdkVersion.UNKNOWN); in createMocksForClass() 91 public List<GeneratedClassFile> createMocksForClass(Class<?> clazz, SdkVersion sdkVersion) in createMocksForClass() 161 CtClass generateInterface(Class<?> originalClass, SdkVersion sdkVersion) { in generateInterface() 234 CtClass generateSubClass(Class<?> superClass, CtClass newInterface, SdkVersion sdkVersion) in generateSubClass() 452 CtClass generateSkeletalClass(Class<?> superClass, CtClass newInterface, SdkVersion sdkVersion) in generateSkeletalClass()
|
D | AndroidMock.java | 2635 className = FileUtils.getSubclassNameFor(clazz, SdkVersion.getCurrentVersion()); in getSubclassFor() 2637 className = FileUtils.getSubclassNameFor(clazz, SdkVersion.UNKNOWN); in getSubclassFor() 2784 className = FileUtils.getInterfaceNameFor(clazz, SdkVersion.getCurrentVersion()); in getInterfaceFor() 2786 className = FileUtils.getInterfaceNameFor(clazz, SdkVersion.UNKNOWN); in getInterfaceFor()
|
/external/android-mock/livetests/com/google/android/testing/mocking/test/ |
D | MockingTest.java | 21 import com.google.android.testing.mocking.SdkVersion; 42 assertEquals(SdkVersion.getCurrentVersion().getPackagePrefix(), in testFrameworkMock()
|
/external/android-mock/ |
D | Android.mk | 27 $(LOCAL_MOCKING_PATH)/SdkVersion.java \
|