Skip to content

Commit 032f9a3

Browse files
committed
Further rewrite, remove legacy AndroidEvent
1 parent 3553e71 commit 032f9a3

File tree

10 files changed

+168
-1128
lines changed

10 files changed

+168
-1128
lines changed

lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidEventTest.kt

Lines changed: 0 additions & 225 deletions
This file was deleted.

lib/src/androidTest/kotlin/at/bitfire/synctools/mapping/calendar/LegacyAndroidEventProcessorTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import android.provider.CalendarContract.ExtendedProperties
1818
import android.provider.CalendarContract.Reminders
1919
import androidx.core.content.contentValuesOf
2020
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
21-
import at.bitfire.ical4android.AndroidEvent
2221
import at.bitfire.ical4android.Event
2322
import at.bitfire.ical4android.LegacyAndroidCalendar
2423
import at.bitfire.ical4android.UnknownProperty
@@ -102,7 +101,7 @@ class LegacyAndroidEventProcessorTest {
102101
insertCallback: (id: Long) -> Unit = {},
103102
extendedProperties: Map<String, String> = emptyMap(),
104103
valuesBuilder: ContentValues.() -> Unit = {}
105-
): AndroidEvent {
104+
): AndroidEvent2 {
106105
val values = ContentValues()
107106
values.put(Events.CALENDAR_ID, destinationCalendar.id)
108107
if (automaticDates) {
@@ -133,7 +132,7 @@ class LegacyAndroidEventProcessorTest {
133132
client.insert(ExtendedProperties.CONTENT_URI.asSyncAdapter(testAccount), extendedValues)
134133
}
135134

136-
return legacyCalendar.getAndroidEvent(destinationCalendar, id)!!
135+
return calendar.getEvent(id)!!
137136
}
138137

139138
private fun populateEvent(

lib/src/androidTest/kotlin/at/bitfire/synctools/storage/calendar/AndroidCalendarTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ class AndroidCalendarTest {
288288
}
289289

290290
@Test
291-
fun testDeleteEvent() {
291+
fun testDeleteEventAndExceptions() {
292292
val id = calendar.addEvent(Entity(contentValuesOf(
293293
Events.CALENDAR_ID to calendar.id,
294294
Events.DTSTART to now,
295295
Events.DTEND to now + 3600000,
296296
Events.TITLE to "Some Event 1"
297297
)))
298298

299-
calendar.deleteEvent(id)
299+
calendar.deleteEventAndExceptions(id)
300300

301301
assertNull(calendar.getEvent(id))
302302
}

0 commit comments

Comments
 (0)