// Path: properlty/src/test/java/com/ufoscout/properlty/ProperltyBaseTest.java
// public abstract class ProperltyBaseTest {
// 
// 	@Rule
// 	public final TestName name = new TestName();
// 
// 	private Date startTime;
// 
// 	@Before
// 	public void setUpBeforeTest() {
// 		startTime = new Date();
// 		System.out.println("===================================================================");
// 		System.out.println("BEGIN TEST " + name.getMethodName());
// 		System.out.println("===================================================================");
// 
// 	}
// 
// 	@After
// 	public void tearDownAfterTest() {
// 		final String time = new BigDecimal(new Date().getTime() - startTime.getTime()).divide(new BigDecimal(1000)).toString();
// 		System.out.println("===================================================================");
// 		System.out.println("END TEST " + name.getMethodName());
// 		System.out.println("Execution time: " + time + " seconds");
// 		System.out.println("===================================================================");
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/PropertyValue.java
// public class PropertyValue {
// 
// 	private String value = "";
// 	private boolean resolvable = true;
// 
// 	public static PropertyValue of(String value) {
// 		return new PropertyValue().value(value);
// 	}
// 
// 	/**
// 	 * The property value
// 	 *
// 	 * @return the value
// 	 */
// 	public String getValue() {
// 		return value;
// 	}
// 	/**
// 	 * Set the property value
// 	 * @param value the value to set
// 	 */
// 	public PropertyValue value(String value) {
// 		this.value = value;
// 		return this;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @return the replaceable
// 	 */
// 	public boolean isResolvable() {
// 		return resolvable;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @param resolvable
// 	 */
// 	public PropertyValue resolvable(boolean resolvable) {
// 		this.resolvable = resolvable;
// 		return this;
// 	}
// 
// 
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/SystemPropertiesReader.java
// public class SystemPropertiesReader implements Reader {
// 
// 	@Override
// 	public Map<String, PropertyValue> read() {
// 		final Map<String, PropertyValue> properties = new HashMap<>();
// 		final Properties systemProperties = System.getProperties();
// 		for(final Entry<Object, Object> x : systemProperties.entrySet()) {
// 		    properties.put((String)x.getKey(), PropertyValue.of((String)x.getValue()));
// 		}
// 		return properties;
// 	}
// 
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Map;
import java.util.UUID;
import org.junit.Test;
import com.ufoscout.properlty.ProperltyBaseTest;
import com.ufoscout.properlty.reader.PropertyValue;
import com.ufoscout.properlty.reader.SystemPropertiesReader;
/*******************************************************************************
 * Copyright 2017 Francesco Cina'
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package com.ufoscout.properlty.reader;





public class SystemPropertiesReaderTest extends ProperltyBaseTest{

	@Test
	public void shouldReadSystemProperties() {
		final String key = UUID.randomUUID().toString();
		final String value = UUID.randomUUID().toString();
		System.setProperty(key, value);

// Path: properlty/src/test/java/com/ufoscout/properlty/ProperltyBaseTest.java
// public abstract class ProperltyBaseTest {
// 
// 	@Rule
// 	public final TestName name = new TestName();
// 
// 	private Date startTime;
// 
// 	@Before
// 	public void setUpBeforeTest() {
// 		startTime = new Date();
// 		System.out.println("===================================================================");
// 		System.out.println("BEGIN TEST " + name.getMethodName());
// 		System.out.println("===================================================================");
// 
// 	}
// 
// 	@After
// 	public void tearDownAfterTest() {
// 		final String time = new BigDecimal(new Date().getTime() - startTime.getTime()).divide(new BigDecimal(1000)).toString();
// 		System.out.println("===================================================================");
// 		System.out.println("END TEST " + name.getMethodName());
// 		System.out.println("Execution time: " + time + " seconds");
// 		System.out.println("===================================================================");
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/PropertyValue.java
// public class PropertyValue {
// 
// 	private String value = "";
// 	private boolean resolvable = true;
// 
// 	public static PropertyValue of(String value) {
// 		return new PropertyValue().value(value);
// 	}
// 
// 	/**
// 	 * The property value
// 	 *
// 	 * @return the value
// 	 */
// 	public String getValue() {
// 		return value;
// 	}
// 	/**
// 	 * Set the property value
// 	 * @param value the value to set
// 	 */
// 	public PropertyValue value(String value) {
// 		this.value = value;
// 		return this;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @return the replaceable
// 	 */
// 	public boolean isResolvable() {
// 		return resolvable;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @param resolvable
// 	 */
// 	public PropertyValue resolvable(boolean resolvable) {
// 		this.resolvable = resolvable;
// 		return this;
// 	}
// 
// 
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/SystemPropertiesReader.java
// public class SystemPropertiesReader implements Reader {
// 
// 	@Override
// 	public Map<String, PropertyValue> read() {
// 		final Map<String, PropertyValue> properties = new HashMap<>();
// 		final Properties systemProperties = System.getProperties();
// 		for(final Entry<Object, Object> x : systemProperties.entrySet()) {
// 		    properties.put((String)x.getKey(), PropertyValue.of((String)x.getValue()));
// 		}
// 		return properties;
// 	}
// 
// }


// Path: properlty-common/src/test/java/com/ufoscout/properlty/reader/SystemPropertiesReaderTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Map;
import java.util.UUID;
import org.junit.Test;
import com.ufoscout.properlty.ProperltyBaseTest;
import com.ufoscout.properlty.reader.PropertyValue;
import com.ufoscout.properlty.reader.SystemPropertiesReader;

/*******************************************************************************
 * Copyright 2017 Francesco Cina'
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package com.ufoscout.properlty.reader;





public class SystemPropertiesReaderTest extends ProperltyBaseTest{

	@Test
	public void shouldReadSystemProperties() {
		final String key = UUID.randomUUID().toString();
		final String value = UUID.randomUUID().toString();
		System.setProperty(key, value);

		final Map<String, PropertyValue> systemProperties = new SystemPropertiesReader().read();