com.hltech.pact.gen.domain.pact.BigDecimalManufacturer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getType(DataProviderStrategy,AttributeMetadata,Map) 0 7 1
1
package com.hltech.pact.gen.domain.pact;
2
3
import uk.co.jemos.podam.api.AttributeMetadata;
4
import uk.co.jemos.podam.api.DataProviderStrategy;
5
import uk.co.jemos.podam.typeManufacturers.AbstractTypeManufacturer;
6
import uk.co.jemos.podam.typeManufacturers.IntTypeManufacturerImpl;
7
8
import java.lang.reflect.Type;
9
import java.math.BigDecimal;
10
import java.util.Map;
11
12
public class BigDecimalManufacturer extends AbstractTypeManufacturer<BigDecimal> {
13
14
    public static final Integer MINIMAL_SCALE = 0;
15
    public static final Integer MAXIMAL_SCALE = 100;
16
17
    @Override
18
    public BigDecimal getType(DataProviderStrategy strategy,
19
                              AttributeMetadata attributeMetadata,
20
                              Map<String, Type> genericTypesArgumentsMap) {
21
        return new BigDecimal(
22
            new BigIntegerManufacturer().getType(strategy, attributeMetadata, genericTypesArgumentsMap),
23
            new IntTypeManufacturerImpl().getIntegerInRange(MINIMAL_SCALE, MAXIMAL_SCALE, attributeMetadata));
24
    }
25
}
26