Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This file is part of bitfireAT/synctools which is released under GPLv3.
* Copyright © All Contributors. See the LICENSE and AUTHOR files in the root directory for details.
* SPDX-License-Identifier: GPL-3.0-or-later
*/

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand Down Expand Up @@ -117,6 +123,9 @@ dependencies {
exclude(group = "org.freemarker")
}

// synctools.test package also provide test rules
implementation(libs.androidx.test.rules)

// instrumented tests
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.test.runner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import android.provider.CalendarContract.Colors
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.GrantPermissionRule
import at.bitfire.ical4android.impl.TestCalendar
import at.bitfire.ical4android.impl.TestEvent
import at.bitfire.ical4android.util.MiscUtils.asSyncAdapter
import at.bitfire.ical4android.util.MiscUtils.closeCompat
import net.fortuna.ical4j.model.property.DtEnd
Expand Down Expand Up @@ -109,12 +108,12 @@ class AndroidCalendarTest {
val cal = TestCalendar.findOrCreate(testAccount, provider)
try {
// add event with color
TestEvent(cal, Event().apply {
AndroidEvent(cal, Event().apply {
dtStart = DtStart("20210314T204200Z")
dtEnd = DtEnd("20210314T204230Z")
color = Css3Color.limegreen
summary = "Test event with color"
}).add()
}, "remove-colors").add()

AndroidCalendar.removeColors(provider, testAccount)
assertEquals(0, countColors(testAccount))
Expand Down
Loading