Loading app/src/test/java/foundation/e/drive/synchronization/StateMachineTest.kt +9 −9 Original line number Diff line number Diff line Loading @@ -50,14 +50,14 @@ class StateMachineTest { } @Test fun `Changing State from PERIODIC_SCAN to IDLE should return false`() { fun `Changing State from PERIODIC_SCAN to IDLE should return true`() { StateMachine.currentState = PERIODIC_SCAN val result = StateMachine.changeState(IDLE) Assert.assertFalse("Changing state from PERIODIC_SCAN to IDLE returned false", result) Assert.assertTrue("Changing state from PERIODIC_SCAN to IDLE returned true", result) val currentState = StateMachine.currentState Assert.assertEquals("Current state should remain PERIODIC_SCAN but is $currentState", PERIODIC_SCAN, currentState) Assert.assertEquals("Current state should be but is $currentState", IDLE, currentState) } @Test Loading @@ -83,14 +83,14 @@ class StateMachineTest { } @Test fun `Changing State from LISTENING_FILE to IDLE should return false`() { fun `Changing State from LISTENING_FILE to IDLE should return true`() { StateMachine.currentState = LISTENING_FILES val result = StateMachine.changeState(IDLE) Assert.assertFalse("Changing state from LISTENING_FILES to IDLE returned true", result) Assert.assertTrue("Changing state from LISTENING_FILES to IDLE returned true", result) val currentState = StateMachine.currentState Assert.assertEquals("Current state should remain LISTENING_FILES but is $currentState", LISTENING_FILES, currentState) Assert.assertEquals("Current state should be IDLE but is $currentState", IDLE, currentState) } @Test Loading Loading @@ -138,14 +138,14 @@ class StateMachineTest { } @Test fun `Changing State from SYNCHRONIZING to IDLE should return false`() { fun `Changing State from SYNCHRONIZING to IDLE should return true`() { StateMachine.currentState = SYNCHRONIZING val result = StateMachine.changeState(IDLE) Assert.assertFalse("Changing state from SYNCHRONIZING to IDLE returned true", result) Assert.assertTrue("Changing state from SYNCHRONIZING to IDLE returned true", result) val currentState = StateMachine.currentState Assert.assertEquals("Current state should remain SYNCHRONIZING but is $currentState", SYNCHRONIZING, currentState) Assert.assertEquals("Current state should be IDLE but is $currentState", IDLE, currentState) } @Test Loading Loading
app/src/test/java/foundation/e/drive/synchronization/StateMachineTest.kt +9 −9 Original line number Diff line number Diff line Loading @@ -50,14 +50,14 @@ class StateMachineTest { } @Test fun `Changing State from PERIODIC_SCAN to IDLE should return false`() { fun `Changing State from PERIODIC_SCAN to IDLE should return true`() { StateMachine.currentState = PERIODIC_SCAN val result = StateMachine.changeState(IDLE) Assert.assertFalse("Changing state from PERIODIC_SCAN to IDLE returned false", result) Assert.assertTrue("Changing state from PERIODIC_SCAN to IDLE returned true", result) val currentState = StateMachine.currentState Assert.assertEquals("Current state should remain PERIODIC_SCAN but is $currentState", PERIODIC_SCAN, currentState) Assert.assertEquals("Current state should be but is $currentState", IDLE, currentState) } @Test Loading @@ -83,14 +83,14 @@ class StateMachineTest { } @Test fun `Changing State from LISTENING_FILE to IDLE should return false`() { fun `Changing State from LISTENING_FILE to IDLE should return true`() { StateMachine.currentState = LISTENING_FILES val result = StateMachine.changeState(IDLE) Assert.assertFalse("Changing state from LISTENING_FILES to IDLE returned true", result) Assert.assertTrue("Changing state from LISTENING_FILES to IDLE returned true", result) val currentState = StateMachine.currentState Assert.assertEquals("Current state should remain LISTENING_FILES but is $currentState", LISTENING_FILES, currentState) Assert.assertEquals("Current state should be IDLE but is $currentState", IDLE, currentState) } @Test Loading Loading @@ -138,14 +138,14 @@ class StateMachineTest { } @Test fun `Changing State from SYNCHRONIZING to IDLE should return false`() { fun `Changing State from SYNCHRONIZING to IDLE should return true`() { StateMachine.currentState = SYNCHRONIZING val result = StateMachine.changeState(IDLE) Assert.assertFalse("Changing state from SYNCHRONIZING to IDLE returned true", result) Assert.assertTrue("Changing state from SYNCHRONIZING to IDLE returned true", result) val currentState = StateMachine.currentState Assert.assertEquals("Current state should remain SYNCHRONIZING but is $currentState", SYNCHRONIZING, currentState) Assert.assertEquals("Current state should be IDLE but is $currentState", IDLE, currentState) } @Test Loading