assertj / assertj/assertj-swing

Support for save/restore preferences (issue 175)

Aperta
#104 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
import from fest-swing Minor New Feature
Lingua principale
Java
Stelle
121
Fork
52
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

_Issue by **[Alex Ruiz](http://jira.codehaus.org/secure/ViewProfile.jspa?name=alexruiz)** from Tue, 3 Mar 2009 19:48:22 -0600_
_Originally opened as http://jira.codehaus.org/browse/FEST-33_

---

From Simeon Fitch:

Several of my higher level GUI components store state in the java.util.prefs.Preferences service. Several tests directly or indirectly modify the Preferences store, leaving behind "artifacts" of

the test runs, which I'd like to avoid. I'm exploring options for backup up and restoring (or pushing/popping) the preferences state in the @Before/@After or @BeforeClass/@AfterClass methods.

I'm curious to know if anyone else has tackled this, or if there are plans to have it included in FEST-Swing.

If not, I'm considering using the Preferences.exportSubtree(OutputStream) and Preferences.importPreferences(InputStream) methods to save/restore from a temporary file. Any thoughts or recommendations?


Original report: Issue 175 (Google Code)

---

votes (original issue): 0
watches (original issue): 0

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non vengono indicati file del repository né test. Inizia individuando i test FEST-Swing che usano java.util.prefs.Preferences e verifica come è organizzato il setup di @Before, @After, @BeforeClass e @AfterClass. Confronta l’approccio proposto con exportSubtree(OutputStream) e importPreferences(InputStream) con il comportamento di pulizia richiesto; «done» dovrebbe significare che le modifiche alle preferenze non lasciano artefatti di test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
testing
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.