(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestDriver_NewSession(t *testing.T) { |
| 26 | driver, err := NewUIADriver(nil, uiaServerURL) |
| 27 | if err != nil { |
| 28 | t.Fatal(err) |
| 29 | } |
| 30 | |
| 31 | firstMatchEntry := make(map[string]interface{}) |
| 32 | firstMatchEntry["package"] = "com.android.settings" |
| 33 | firstMatchEntry["activity"] = "com.android.settings/.Settings" |
| 34 | caps := Capabilities{ |
| 35 | "firstMatch": []interface{}{firstMatchEntry}, |
| 36 | "alwaysMatch": struct{}{}, |
| 37 | } |
| 38 | session, err := driver.NewSession(caps) |
| 39 | if err != nil { |
| 40 | t.Fatal(err) |
| 41 | } |
| 42 | if len(session.SessionId) == 0 { |
| 43 | t.Fatal("should not be empty") |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func TestNewDriver(t *testing.T) { |
| 48 | driver, err := NewUIADriver(nil, uiaServerURL) |
nothing calls this directly
no test coverage detected