Object
IntegrityTest
Series3000<Unit<?>>
Test3201
Verifies that the software allows correct definition of a user-defined unit.
Test method: | Create user-defined unit for each of several different units. |
---|---|
Test data: | GIGS_lib_3201_Unit.txt .
Contains the ratio of the unit to the ISO base unit for that unit type.
The test methods are separated in three blocks for linear units, angular units and scaling units. |
Expected result: | The software should accept the test data. The properties of the created objects will be compared with the properties given to the factory method. |
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionUnit<?>
The base unit of the unit to create.double
Amount ofbase units
in one tested unit.Fields inherited from class Series3000
isFactoryPreservingUserValues, properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUnit<?>
Returns the unit instance to be tested.void
Tests “GIGS unit L0” unit creation from the factory.void
Tests “GIGS unit L2” unit creation from the factory.void
Tests “GIGS unit L3” unit creation from the factory.void
Tests “GIGS unit L5” unit creation from the factory.void
Tests “GIGS unit L4” unit creation from the factory.void
Tests “GIGS unit L1” unit creation from the factory.void
Tests “GIGS unit L6” unit creation from the factory.void
Tests “GIGS unit L9” unit creation from the factory.void
Tests “GIGS unit L8” unit creation from the factory.void
Tests “GIGS unit L7” unit creation from the factory.void
Tests “GIGS unit L11” unit creation from the factory.void
Tests “GIGS unit L12” unit creation from the factory.void
Tests “GIGS unit L13” unit creation from the factory.void
Tests “GIGS unit A0” unit creation from the factory.void
Tests “GIGS unit A2” unit creation from the factory.void
Tests “GIGS unit A3” unit creation from the factory.void
Tests “GIGS unit A4” unit creation from the factory.void
Tests “GIGS unit A1” unit creation from the factory.void
Tests “GIGS unit A5” unit creation from the factory.void
Tests “GIGS unit U0” unit creation from the factory.void
Tests “GIGS unit U1” unit creation from the factory.void
Tests “GIGS unit L10 (parts per million)” unit creation from the factory.
-
Field Details
-
unitToBase
public double unitToBaseAmount ofbase units
in one tested unit. If this amount is not a constant (as in sexagesimal unit), then this factor is set toDouble.NaN
. This field is set by all test methods before to create and verify theUnit
instance. -
baseUnit
public Unit<?> baseUnitThe base unit of the unit to create. This field will have one of the following values:Units.metre()
if the unit to create is linear,Units.radian()
if the unit to create is angular (except sexagesimal unit),Units.one()
if the unit to create is a scale or a coefficient, or
Unit
instance.
-
-
Constructor Details
-
Test3201
public Test3201()Creates a new test.
-
-
Method Details
-
getIdentifiedObject
public Unit<?> getIdentifiedObject()Returns the unit instance to be tested. When this method is invoked for the first time, it creates the unit to test by invokingUnit.multiply(double)
on thebaseUnit
using theunitToBase
parameter. The created object is then cached and returned in all subsequent invocations of this method.- Specified by:
getIdentifiedObject
in classSeries3000<Unit<?>>
- Returns:
- the unit instance to test.
-
GIGS_69101
Tests “GIGS unit A0” unit creation from the factory.- GIGS unit: 69101
- GIGS unit name: GIGS unit A0
- EPSG equivalence: 9101 – radian
- Unit type: Angle
- Base Units per Unit: 1
- See Also:
-
GIGS_69109
Tests “GIGS unit A1” unit creation from the factory.- GIGS unit: 69109
- GIGS unit name: GIGS unit A1
- EPSG equivalence: 9109 – microradian
- Unit type: Angle
- Base Units per Unit: 1.0E-6
- See Also:
-
GIGS_69102
Tests “GIGS unit A2” unit creation from the factory.- GIGS unit: 69102
- GIGS unit name: GIGS unit A2
- EPSG equivalence: 9102 – degree
- Unit type: Angle
- Base Units per Unit: 0.017453293
- See Also:
-
GIGS_69104
Tests “GIGS unit A3” unit creation from the factory.- GIGS unit: 69104
- GIGS unit name: GIGS unit A3
- EPSG equivalence: 9104 – arc-second
- Unit type: Angle
- Base Units per Unit: 4.84814E-6
- See Also:
-
GIGS_69105
Tests “GIGS unit A4” unit creation from the factory.- GIGS unit: 69105
- GIGS unit name: GIGS unit A4
- EPSG equivalence: 9105 – grad
- Unit type: Angle
- Base Units per Unit: 0.015707963
- See Also:
-
GIGS_69113
Tests “GIGS unit A5” unit creation from the factory.- GIGS unit: 69113
- GIGS unit name: GIGS unit A5
- EPSG equivalence: 9113 – centesimal second
- Unit type: Angle
- Base Units per Unit: 1.5708E-6
- See Also:
-
GIGS_69001
Tests “GIGS unit L0” unit creation from the factory.- GIGS unit: 69001
- GIGS unit name: GIGS unit L0
- EPSG equivalence: 9001 – metre
- Unit type: Linear
- Base Units per Unit: 1
-
GIGS_69036
Tests “GIGS unit L1” unit creation from the factory.- GIGS unit: 69036
- GIGS unit name: GIGS unit L1
- EPSG equivalence: 9036 – kilometre
- Unit type: Linear
- Base Units per Unit: 1000
- See Also:
-
GIGS_69301
Tests “GIGS unit L10 (parts per million)” unit creation from the factory.- GIGS unit: 69301
- GIGS unit name: GIGS unit L10 (parts per million)
- EPSG equivalence: 9301 – parts per million
- Unit type: Linear
- Base Units per Unit: 20.116756
- See Also:
-
GIGS_69084
Tests “GIGS unit L11” unit creation from the factory.- GIGS unit: 69084
- GIGS unit name: GIGS unit L11
- EPSG equivalence: 9084 – Indian yard
- Unit type: Linear
- Base Units per Unit: 0.914398531
- See Also:
-
GIGS_69094
Tests “GIGS unit L12” unit creation from the factory.- GIGS unit: 69094
- GIGS unit name: GIGS unit L12
- EPSG equivalence: 9094 – Gold Coast foot
- Unit type: Linear
- Base Units per Unit: 0.30479971
- See Also:
-
GIGS_69098
Tests “GIGS unit L13” unit creation from the factory.- GIGS unit: 69098
- GIGS unit name: GIGS unit L13
- EPSG equivalence: 9098 – link
- Unit type: Linear
- Base Units per Unit: 0.201168
- See Also:
-
GIGS_69002
Tests “GIGS unit L2” unit creation from the factory.- GIGS unit: 69002
- GIGS unit name: GIGS unit L2
- EPSG equivalence: 9002 – foot
- Unit type: Linear
- Base Units per Unit: 0.3048
- See Also:
-
GIGS_69003
Tests “GIGS unit L3” unit creation from the factory.- GIGS unit: 69003
- GIGS unit name: GIGS unit L3
- EPSG equivalence: 9003 – US survey foot
- Unit type: Linear
- Base Units per Unit: 0.30480061
- See Also:
-
GIGS_69031
Tests “GIGS unit L4” unit creation from the factory.- GIGS unit: 69031
- GIGS unit name: GIGS unit L4
- EPSG equivalence: 9031 – German legal metre
- Unit type: Linear
- Base Units per Unit: 1.000013597
- See Also:
-
GIGS_69005
Tests “GIGS unit L5” unit creation from the factory.- GIGS unit: 69005
- GIGS unit name: GIGS unit L5
- EPSG equivalence: 9005 – Clarke's foot
- Unit type: Linear
- Base Units per Unit: 0.304797265
- See Also:
-
GIGS_69039
Tests “GIGS unit L6” unit creation from the factory.- GIGS unit: 69039
- GIGS unit name: GIGS unit L6
- EPSG equivalence: 9039 – Clarke's link
- Unit type: Linear
- Base Units per Unit: 0.201166195
- See Also:
-
GIGS_69042
Tests “GIGS unit L7” unit creation from the factory.- GIGS unit: 69042
- GIGS unit name: GIGS unit L7
- EPSG equivalence: 9042 – British chain (Sears 1922)
- Unit type: Linear
- Base Units per Unit: 20.11676512
- See Also:
-
GIGS_69041
Tests “GIGS unit L8” unit creation from the factory.- GIGS unit: 69041
- GIGS unit name: GIGS unit L8
- EPSG equivalence: 9041 – British foot (Sears 1922)
- Unit type: Linear
- Base Units per Unit: 0.304799472
- See Also:
-
GIGS_69040
Tests “GIGS unit L9” unit creation from the factory.- GIGS unit: 69040
- GIGS unit name: GIGS unit L9
- EPSG equivalence: 9040 – British yard (Sears 1922)
- Unit type: Linear
- Base Units per Unit: 0.914398415
- See Also:
-
GIGS_69201
Tests “GIGS unit U0” unit creation from the factory.- GIGS unit: 69201
- GIGS unit name: GIGS unit U0
- EPSG equivalence: 9201 – unity
- Unit type: Scale
- Base Units per Unit: 1
- See Also:
-
GIGS_69202
Tests “GIGS unit U1” unit creation from the factory.- GIGS unit: 69202
- GIGS unit name: GIGS unit U1
- EPSG equivalence: 9202 – parts per million
- Unit type: Scale
- Base Units per Unit: 1.0E-6
- See Also:
-