From 583d71bf6da096e89b4eab66b80bbd21bcf7b374 Mon Sep 17 00:00:00 2001 From: Grzegorz Orczykowski <grzesiek2010@gmail.com> Date: Tue, 23 Apr 2024 21:16:03 +0200 Subject: [PATCH] Fixed IdentityPromptViewModelTest --- .../formentry/audit/IdentityPromptViewModelTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collect_app/src/test/java/org/odk/collect/android/formentry/audit/IdentityPromptViewModelTest.java b/collect_app/src/test/java/org/odk/collect/android/formentry/audit/IdentityPromptViewModelTest.java index 760c927cd1f..a020e1392a7 100644 --- a/collect_app/src/test/java/org/odk/collect/android/formentry/audit/IdentityPromptViewModelTest.java +++ b/collect_app/src/test/java/org/odk/collect/android/formentry/audit/IdentityPromptViewModelTest.java @@ -10,14 +10,18 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import java.io.File; +import java.io.IOException; + @RunWith(AndroidJUnit4.class) public class IdentityPromptViewModelTest { @Test - public void done_setsUserOnAuditEventLogger() { + public void done_setsUserOnAuditEventLogger() throws IOException { FormController formController = mock(FormController.class); AuditEventLogger auditEventLogger = mock(AuditEventLogger.class); when(formController.getAuditEventLogger()).thenReturn(auditEventLogger); + when(formController.getInstanceFile()).thenReturn(File.createTempFile("instance", ".xml")); IdentityPromptViewModel viewModel = new IdentityPromptViewModel();