aboutsummaryrefslogtreecommitdiff
path: root/work/workmanager/src/androidTest/java
diff options
context:
space:
mode:
authorSumir Kataria <sumir@google.com>2018-05-11 13:56:52 -0700
committerSumir Kataria <sumir@google.com>2018-05-11 14:21:31 -0700
commit6aa349fecb357634a176b8ca3343231eefcee249 (patch)
tree0a7a7a6c584a72a1f7f16e5fcbdea773923e493b /work/workmanager/src/androidTest/java
parent5ca019f41e0d31e5c462a71dd056180cebdc1dcd (diff)
downloadsupport-6aa349fecb357634a176b8ca3343231eefcee249.tar.gz
Don't disable FJS if not present.
Also remove unused InternalLogger. Change-Id: I71eaeeb63df6344ad27c17a4acb0d35b9814862f Fixes: 79306274 Test: Ran and logged test app.
Diffstat (limited to 'work/workmanager/src/androidTest/java')
-rw-r--r--work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java6
-rw-r--r--work/workmanager/src/androidTest/java/androidx/work/impl/logger/InternalLoggerTest.java81
2 files changed, 0 insertions, 87 deletions
diff --git a/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java b/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
index cb5e59be3c3..be5ace8159e 100644
--- a/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
+++ b/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
@@ -58,7 +58,6 @@ import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SdkSuppress;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
-import android.util.Log;
import androidx.work.BackoffPolicy;
import androidx.work.Configuration;
@@ -71,7 +70,6 @@ import androidx.work.TestLifecycleOwner;
import androidx.work.WorkContinuation;
import androidx.work.WorkRequest;
import androidx.work.WorkStatus;
-import androidx.work.impl.logger.InternalLogger;
import androidx.work.impl.model.Dependency;
import androidx.work.impl.model.DependencyDao;
import androidx.work.impl.model.WorkName;
@@ -101,10 +99,6 @@ import java.util.concurrent.TimeUnit;
@RunWith(AndroidJUnit4.class)
public class WorkManagerImplTest {
- static {
- InternalLogger.LOG_LEVEL = Log.DEBUG;
- }
-
private WorkDatabase mDatabase;
private WorkManagerImpl mWorkManagerImpl;
diff --git a/work/workmanager/src/androidTest/java/androidx/work/impl/logger/InternalLoggerTest.java b/work/workmanager/src/androidTest/java/androidx/work/impl/logger/InternalLoggerTest.java
deleted file mode 100644
index f22b6af17bd..00000000000
--- a/work/workmanager/src/androidTest/java/androidx/work/impl/logger/InternalLoggerTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * 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
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package androidx.work.impl.logger;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.Log;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-
-
-@RunWith(AndroidJUnit4.class)
-@SmallTest
-public class InternalLoggerTest {
-
- private static final String TAG = "InternalLoggerTest";
-
- @Rule
- public ExpectedException mThrown = ExpectedException.none();
-
- @Before
- public void setUp() {
- InternalLogger.LOG_LEVEL = Log.VERBOSE;
- }
-
- @Test
- public void testLog_verbose() {
- assertThat(InternalLogger.isLoggable(Log.VERBOSE), is(true));
- InternalLogger.LOG_LEVEL = Log.DEBUG;
- assertThat(InternalLogger.isLoggable(Log.VERBOSE), is(false));
- }
-
- @Test
- public void testLog_debug() {
- assertThat(InternalLogger.isLoggable(Log.DEBUG), is(true));
- InternalLogger.LOG_LEVEL = Log.INFO;
- assertThat(InternalLogger.isLoggable(Log.DEBUG), is(false));
- }
-
- @Test
- public void testLog_info() {
- assertThat(InternalLogger.isLoggable(Log.INFO), is(true));
- InternalLogger.LOG_LEVEL = Log.WARN;
- assertThat(InternalLogger.isLoggable(Log.INFO), is(false));
- }
-
- @Test
- public void testLog_warn() {
- assertThat(InternalLogger.isLoggable(Log.WARN), is(true));
- InternalLogger.LOG_LEVEL = Log.ERROR;
- assertThat(InternalLogger.isLoggable(Log.WARN), is(false));
- }
-
- @Test
- public void testLog_error() {
- assertThat(InternalLogger.isLoggable(Log.ERROR), is(true));
- InternalLogger.LOG_LEVEL = Log.ASSERT;
- assertThat(InternalLogger.isLoggable(Log.ERROR), is(false));
- }
-}