@Test public void testGetLowestPrice() { TnPoi tnpoi = new TnPoi(); GasPriceInfo gasPriceInfo = new GasPriceInfo(); List<GasPriceInfo> gasPriceInfos = new ArrayList<GasPriceInfo>(); gasPriceInfos.add(gasPriceInfo); gasPriceInfo.setPrice(1.0); gasPriceInfo.setGasType(GasPriceTypeDef.TYPE_BASIC_GRADE); tnpoi.setGasPriceInfos(gasPriceInfos); AdjugglerUtil.getLowestPrice(tnpoi); gasPriceInfo.setGasType(GasPriceTypeDef.TYPE_MID_GRADE); tnpoi.setGasPriceInfos(gasPriceInfos); AdjugglerUtil.getLowestPrice(tnpoi); gasPriceInfo.setGasType(GasPriceTypeDef.TYPE_HIGH_GRADE); tnpoi.setGasPriceInfos(gasPriceInfos); AdjugglerUtil.getLowestPrice(tnpoi); gasPriceInfo.setGasType(GasPriceTypeDef.TYPE_DIESEL_GRADE); tnpoi.setGasPriceInfos(gasPriceInfos); AdjugglerUtil.getLowestPrice(tnpoi); }
public TnPoi getTnPoi() { TnPoi poi = new TnPoi(); poi.setFeatureName("feature name"); poi.setBrandName("brand name"); return poi; }