- Alt+Enter Quick Fix 補完
- Command+shift+T Go to Test テストクラス・対象クラス間を移動。対応するテストクラスがない場合には生成ダイアログを表示
- Alt+shift+F10 Run Test テストクラスまたはテストメソッドを実行
- ソースフォルダ右クリック→[New]→[Java Class]で対象クラスを作成
- Command+shift+T→[Create New Test]でテストクラス作成ダイアログからテストクラスを作成
| (defun split-str (string &optional (separator " ")) | |
| (split-str-1 string separator)) | |
| (defun split-str-1 (string &optional (separator " ") (r nil)) | |
| (let ((n (position separator string | |
| :from-end t | |
| :test #'(lambda (x y) | |
| (find y x :test #'string=))))) | |
| (if n | |
| (split-str-1 (subseq string 0 n) separator (cons (subseq string (1+ n)) r)) |
| <intent-filter> | |
| <action android:name="android.intent.action.VIEW" /> | |
| <category android:name="android.intent.category.DEFAULT" /> | |
| <data android:mimeType="*/*" /> | |
| <data android:scheme="file" /> | |
| <data android:host="*" /> | |
| <data android:pathPattern=".*\\.xxx" /> | |
| </intent-filter> |
| package net.siguremon.sample.junit; | |
| public class Calc { | |
| public int sum(int x, int y) { | |
| return x + y; | |
| } | |
| } |
| package net.siguremon.sample.junit; | |
| import static org.junit.Assert.*; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| public class CalcTest { |
| <?xml version="1.0"?> | |
| <project name="SimpleAnt" default="compile"> | |
| <target name="compile"> | |
| <echo>compileだけど表示するだけで何もしない</echo> | |
| </target> | |
| <target name="test" depends="compile"> | |
| <echo>testだけど表示するだけで何もしない</echo> | |
| </target> | |
| </project> |
| これはテスト1ですよ |
| package SeleniumSample; | |
| import org.apache.commons.io.FileUtils; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.chrome.ChromeDriver; | |
| import org.openqa.selenium.firefox.FirefoxDriver; | |
| import org.openqa.selenium.ie.InternetExplorerDriver; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; | |
| import org.openqa.selenium.support.ui.WebDriverWait; |
| import org.apache.commons.io.FileUtils; | |
| import org.openqa.selenium.OutputType; | |
| import org.openqa.selenium.TakesScreenshot; | |
| File tmpFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); | |
| try { | |
| FileUtils.copyFile(tmpFile, new File("tmp.png")); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| } |
| // 指定のウィンドウサイズに変更 | |
| int width = 1000; | |
| int height = 500; | |
| driver.manage().window().setSize(new Dimension(width, height)); | |
| // 最大化 | |
| driver.manage().window().maximize(); |