package com.codeaffine.extras.jdt.internal.prefs;

import static com.codeaffine.extras.jdt.internal.prefs.WorkspaceScopePreferences.PREF_SHOW_JUNIT_STATUS_BAR;
import static org.assertj.core.api.Assertions.assertThat;

import org.eclipse.jface.preference.PreferenceStore;
import org.junit.Before;
import org.junit.Test;

public class WorkspaceScopePreferencesTest {

  private PreferenceStore store;
  private WorkspaceScopePreferences workspaceScopePreferences;

  @Before
  public void setUp() {
    store = new PreferenceStore();
    workspaceScopePreferences = new WorkspaceScopePreferences( store );
  }

  @Test
  public void testSetShowJUnitStatusBar() {
    workspaceScopePreferences.setShowJUnitStatusBar( true );

    assertThat( store.getBoolean( PREF_SHOW_JUNIT_STATUS_BAR ) ).isTrue();
  }

  @Test
    public void testIsShowJUnitStatusBar() {
      store.setValue( PREF_SHOW_JUNIT_STATUS_BAR, true );
  
      assertThat( workspaceScopePreferences.isShowJUnitStatusBar() ).isTrue();
    }

  @Test
  public void testGetPreferenceStore() {
    assertThat( workspaceScopePreferences.getPreferenceStore() ).isSameAs( store );
  }
}

@@ -805,18 +805,16 @@
   @Test%0A
-  
   public
@@ -848,18 +848,16 @@
 Bar() %7B%0A
-  
     stor
@@ -908,13 +908,9 @@
  );%0A
-  %0A  
+%0A
     
@@ -982,18 +982,16 @@
 True();%0A
-  
   %7D%0A%0A  @

Fix indentation