/*
- * Sone - MemoryDatabaseTest.java - Copyright © 2013 David Roden
+ * Sone - MemoryDatabaseTest.java - Copyright © 2013–2015 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
when(sone.isLocal()).thenReturn(true);
memoryDatabase.addFriend(sone, "Friend1");
memoryDatabase.addFriend(sone, "Friend1");
- verify(configuration, times(2)).getStringValue(anyString());
+ verify(configuration, times(3)).getStringValue(anyString());
}
@Test
@Test
public void configurationIsNotWrittenWhenANonFriendIsRemoved() {
+ prepareConfigurationValues();
when(sone.isLocal()).thenReturn(true);
memoryDatabase.removeFriend(sone, "Friend1");
- verify(configuration, never()).getStringValue(anyString());
+ verify(configuration).getStringValue(anyString());
}
}