This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import android.test.suitebuilder.annotation.SmallTest; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import static org.junit.Assert.*; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ペーストのショートカットCtrl+Vを打鍵すればおk | |
// Espresso | |
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); | |
instrumentation.sendKeySync(new KeyEvent(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_V, 0, KeyEvent.META_CTRL_ON)); | |
instrumentation.sendKeySync(new KeyEvent(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), KeyEvent.ACTION_UP, KeyEvent.KEYCODE_V, 0, KeyEvent.META_CTRL_ON)); | |
//uiautomator | |
UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); | |
device.pressKeyCode(KeyEvent.KEYCODE_V, KeyEvent.META_CTRL_ON); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.lang.reflect.Array; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.uphyca.mockitoonart; | |
import org.mockito.Mock; | |
import static org.fest.assertions.api.Assertions.assertThat; | |
import static org.mockito.Mockito.verify; | |
import static org.mockito.Mockito.when; | |
public class NoArgsInterfaceMethodTest extends MockitoTestCase { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new MyView(new ContextThemeWrapper(targetContext, R.style.AppTheme)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public java.lang.String toString() { | |
return com.google.common.base.MoreObjects.toStringHelper(this) | |
#foreach ($member in $members) | |
.add("$member.name", $member.accessor) | |
#end | |
.toString(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2015 uPhyca Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GoogleAnalytics ga = GoogleAnalytics.getInstance(context); | |
ga.setDryRun(true); | |
ga.getLogger().setLogLevel(Logger.LogLevel.VERBOSE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InputStreamを開く方法 | |
1. ファイルシステムAPI | |
InputStream in = new FileInputStream(new File("/opt/foo/bar/mybatis-config.xml")); | |
2.1 リソースAPI | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:04:43.730: Label add tap | |
14:04:44.237: OK - View with monkeyID CustometPreviewActivity, Navigate up is being clipped. | |
14:04:44.242: TextArea "name textfield" enterText <name> | |
14:04:44.745: TextArea "mail textfield" enterText <mail> | |
14:04:45.251: OK - Label with monkeyID preview is being clipped. | |
14:04:45.257: ButtonSelector "gender segmentedcontrol" Select <gender> | |
14:04:48.002: ERROR: Unable to find Radio Button '<gender>' | |
14:04:48.047: Completed Script Playback - ERROR Unable to find Radio Button '<gender>' |
NewerOlder