// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java
// public static DoubleRange range(double limit1, double limit2) {
// 	return new DoubleRange(limit1, limit2);
// }
// 
// Path: public-java/iamcontent-core/src/test/java/com/iamcontent/core/math/MathUtilsTest.java
// public static void assertExactlyEquals(double expected, double actual) {
// 	assertEquals(expected, actual, 0.0);
// }


import static org.junit.Assert.assertEquals;
import static com.iamcontent.core.math.DoubleRange.range;
import static com.iamcontent.core.math.MathUtilsTest.assertExactlyEquals;
import org.junit.Test;

/**
  IAmContent Public Libraries.
  Copyright (C) 2015-2021 Greg Elderfield
  @author Greg Elderfield, support@jarchitect.co.uk
 
  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 the Free Software Foundation; either version 2 of 
  the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this program;
  if not, write to the Free Software Foundation, Inc., 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.iamcontent.core.math;



public class DoubleRangeTest {
	
	private static final DoubleRange RANGE_1_TO_10 = range(1.0, 10.0);
	private static final DoubleRange RANGE_7_TO_3 = range(7.0, 3.0);

	@Test
	public void testGetters() {
		checkGetters(RANGE_1_TO_10, 1.0, 10.0, 1.0, 10.0);
		checkGetters(RANGE_7_TO_3, 7.0, 3.0, 3.0, 7.0);
	}

	private void checkGetters(DoubleRange range, double limit1, double limit2, double min, double max) {

// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java
// public static DoubleRange range(double limit1, double limit2) {
// 	return new DoubleRange(limit1, limit2);
// }
// 
// Path: public-java/iamcontent-core/src/test/java/com/iamcontent/core/math/MathUtilsTest.java
// public static void assertExactlyEquals(double expected, double actual) {
// 	assertEquals(expected, actual, 0.0);
// }


// Path: public-java/iamcontent-core/src/test/java/com/iamcontent/core/math/DoubleRangeTest.java
import static org.junit.Assert.assertEquals;
import static com.iamcontent.core.math.DoubleRange.range;
import static com.iamcontent.core.math.MathUtilsTest.assertExactlyEquals;
import org.junit.Test;

/**
  IAmContent Public Libraries.
  Copyright (C) 2015-2021 Greg Elderfield
  @author Greg Elderfield, support@jarchitect.co.uk
 
  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 the Free Software Foundation; either version 2 of 
  the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this program;
  if not, write to the Free Software Foundation, Inc., 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.iamcontent.core.math;



public class DoubleRangeTest {
	
	private static final DoubleRange RANGE_1_TO_10 = range(1.0, 10.0);
	private static final DoubleRange RANGE_7_TO_3 = range(7.0, 3.0);

	@Test
	public void testGetters() {
		checkGetters(RANGE_1_TO_10, 1.0, 10.0, 1.0, 10.0);
		checkGetters(RANGE_7_TO_3, 7.0, 3.0, 3.0, 7.0);
	}

	private void checkGetters(DoubleRange range, double limit1, double limit2, double min, double max) {

		assertExactlyEquals(limit1, range.getLimit1());
