From 54b17285816c3f5c9d6d7b7b49c6f0bef71e9df5 Mon Sep 17 00:00:00 2001 From: Daniel Jette Date: Fri, 15 Sep 2023 08:55:31 -0400 Subject: [PATCH] 41: Extract ViewModification --- .../main/java/dev/testify/ScreenshotRule.kt | 1 - .../main/java/dev/testify/ViewModification.kt | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Library/src/main/java/dev/testify/ViewModification.kt diff --git a/Library/src/main/java/dev/testify/ScreenshotRule.kt b/Library/src/main/java/dev/testify/ScreenshotRule.kt index 3a153106..eb728cb3 100644 --- a/Library/src/main/java/dev/testify/ScreenshotRule.kt +++ b/Library/src/main/java/dev/testify/ScreenshotRule.kt @@ -89,7 +89,6 @@ import org.junit.runners.model.Statement import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit -typealias ViewModification = (rootView: ViewGroup) -> Unit typealias ViewProvider = (rootView: ViewGroup) -> View @Suppress("unused", "MemberVisibilityCanBePrivate") diff --git a/Library/src/main/java/dev/testify/ViewModification.kt b/Library/src/main/java/dev/testify/ViewModification.kt new file mode 100644 index 00000000..d5530fa1 --- /dev/null +++ b/Library/src/main/java/dev/testify/ViewModification.kt @@ -0,0 +1,28 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2023 ndtp + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package dev.testify + +import android.view.ViewGroup + +typealias ViewModification = (rootView: ViewGroup) -> Unit