/*                                                                      *\
**                    SICU Stress Measurement System                    **
**                      Project P04  |  C380 Team A                     **
**          EBME 380: Biomedical Engineering Design Experience          **
**                    Case Western Reserve University                   **
**                          2016 Fall Semester                          **
\*                                                                      */

package edu.cwru.sicu_sms.util;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Properties;

import static org.junit.jupiter.api.Assertions.*;

/**
 * Test class for {@link PropertyOperator}.
 *
 * @since December 14, 2016
 * @author Ted Frohlich <ttf10@case.edu>
 * @author Abby Walker <amw138@case.edu>
 */
class PropertyOperatorTest {
    
    private static final String PATH_ROOT = "src/test/resources/util/";
    private static final String LOAD_FILE = PATH_ROOT + "TestProperties.properties";
    private static final String SAVE_FILE = PATH_ROOT + "TestProperties.properties";
    
    private Properties propertiesToTest;
    
    @BeforeEach
    void setUp() {
        propertiesToTest = new Properties();
        propertiesToTest.setProperty("key_string", "value_string");
        propertiesToTest.setProperty("key_int",    "380");
        propertiesToTest.setProperty("key_float",  "216.368");
    }
    
    @AfterEach
    void tearDown() {
        propertiesToTest.clear();
        propertiesToTest = null;
        // TODO: restore original file state
    }
    
    @Test
    void loadProperties() {
        Properties loadedProperties = PropertyOperator.loadProperties(LOAD_FILE);
        
        assertEquals(propertiesToTest.size(), loadedProperties.size());
        
        loadedProperties.keySet().forEach(key -> {
            Object value = loadedProperties.get(key);
            System.out.println(key + "=" + value);
            
            assert propertiesToTest.containsKey(key);
            Object expectedValue = propertiesToTest.get(key);
            
            assertEquals(expectedValue, value);
        });
    }
    
    @Test
    void saveProperties() {
        Properties propertiesToSave = propertiesToTest;
        propertiesToSave.setProperty("new_key", "new_value");
        
        boolean success = PropertyOperator.saveProperties(
                propertiesToSave, SAVE_FILE, "Test Properties - UPDATED");
        
        assert success;
    }
    
}
@@ -981,20 +981,30 @@
  String 
-PATH
+TEST_RESOURCES
 _ROOT = 
@@ -1027,158 +1027,52 @@
 ces/
-util/
 %22;%0A    
-private static final String LOAD_FILE = PATH_ROOT + %22TestProperties.properties%22;%0A    private static final String SAVE_FILE = PATH_ROOT + %22
+%0A    private String filename = %22util/
 Test
@@ -1699,17 +1699,16 @@
 ies(
-LOAD_FILE
+filename
 );%0A 
@@ -2426,19 +2426,72 @@
 ave,
- SAVE_FILE,
+%0A                TEST_RESOURCES_ROOT + filename,%0A               
  %22Te

Fix path used for loading versus saving