Files
engine/shell/platform/android/test/io/flutter/SmokeTest.java
T
Michael Klimushyn 8ed5da8b65 Add working Robolectric tests (#9954)
`gclient sync` now grabs Robolectric, JUnit, and their transitive
runtime dependencies. They're being stored in a new CIPD package,
`flutter/android/robolectric_bundle`.

`shell/platform/android/BUILD.gn` has a new target for building the
tests, `robolectric_tests`. `testing/run_tests.py` has been extended to
build and run the new target. Runs the android tests under
"build_and_test_android" on CI.

This also adds some very simple sample tests to start with and a README
to the java tests directory.
2019-07-23 09:06:19 -07:00

24 lines
705 B
Java

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package io.flutter;
import static org.junit.Assert.assertTrue;
import android.text.TextUtils;
import org.junit.runner.RunWith;
import org.junit.Test;
import org.robolectric.annotation.Config;
import org.robolectric.RobolectricTestRunner;
/** Basic smoke test verifying that Robolectric is loaded and mocking out Android APIs. */
@Config(manifest=Config.NONE)
@RunWith(RobolectricTestRunner.class)
public class SmokeTest {
@Test
public void androidLibraryLoaded() {
assertTrue(TextUtils.equals("xyzzy", "xyzzy"));
}
}