public virtual void requirements() { CalculationTaskCell cell = CalculationTaskCell.of(0, 0, TestingMeasures.PRESENT_VALUE, NATURAL); CalculationTask task = CalculationTask.of(TARGET, new TestFunction(), cell); MarketDataRequirements requirements = task.requirements(REF_DATA); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: java.util.Set<? extends com.opengamma.strata.data.MarketDataId<?>> nonObservables = requirements.getNonObservables(); ISet <MarketDataId <object> > nonObservables = requirements.NonObservables; //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.google.common.collect.ImmutableSet<? extends com.opengamma.strata.data.ObservableId> observables = requirements.getObservables(); ImmutableSet <ObservableId> observables = requirements.Observables; ImmutableSet <ObservableId> timeSeries = requirements.TimeSeries; //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.opengamma.strata.data.MarketDataId<?> timeSeriesId = com.opengamma.strata.calc.marketdata.TestObservableId.of("3", OBS_SOURCE); MarketDataId <object> timeSeriesId = TestObservableId.of("3", OBS_SOURCE); assertThat(timeSeries).hasSize(1); assertThat(timeSeries.GetEnumerator().next()).isEqualTo(timeSeriesId); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.opengamma.strata.data.MarketDataId<?> nonObservableId = new com.opengamma.strata.calc.marketdata.TestId("1"); MarketDataId <object> nonObservableId = new TestId("1"); assertThat(nonObservables).hasSize(1); assertThat(nonObservables.GetEnumerator().next()).isEqualTo(nonObservableId); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.opengamma.strata.data.MarketDataId<?> observableId = com.opengamma.strata.calc.marketdata.TestObservableId.of("2", OBS_SOURCE); MarketDataId <object> observableId = TestObservableId.of("2", OBS_SOURCE); assertThat(observables).hasSize(1); assertThat(observables.GetEnumerator().next()).isEqualTo(observableId); }
//------------------------------------------------------------------------- public virtual void test_requirements() { CalculationFunctions functions = CalculationFunctions.of(ImmutableMap.of(typeof(TestTarget), new TestFunction())); CalculationRules calculationRules = CalculationRules.of(functions, USD); IList <TestTarget> targets = ImmutableList.of(TARGET1); IList <Column> columns = ImmutableList.of(Column.of(TestingMeasures.PRESENT_VALUE)); CalculationTasks test = CalculationTasks.of(calculationRules, targets, columns); MarketDataRequirements requirements = test.requirements(REF_DATA); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: java.util.Set<? extends com.opengamma.strata.data.MarketDataId<?>> nonObservables = requirements.getNonObservables(); ISet <MarketDataId <object> > nonObservables = requirements.NonObservables; //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.google.common.collect.ImmutableSet<? extends com.opengamma.strata.data.ObservableId> observables = requirements.getObservables(); ImmutableSet <ObservableId> observables = requirements.Observables; ImmutableSet <ObservableId> timeSeries = requirements.TimeSeries; assertThat(nonObservables).hasSize(1); assertThat(nonObservables.GetEnumerator().next()).isEqualTo(TestId.of("1")); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.opengamma.strata.data.MarketDataId<?> observableId = com.opengamma.strata.calc.marketdata.TestObservableId.of("2", CalculationTaskTest.OBS_SOURCE); MarketDataId <object> observableId = TestObservableId.of("2", CalculationTaskTest.OBS_SOURCE); assertThat(observables).hasSize(1); assertThat(observables.GetEnumerator().next()).isEqualTo(observableId); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: com.opengamma.strata.data.MarketDataId<?> timeSeriesId = com.opengamma.strata.calc.marketdata.TestObservableId.of("3", CalculationTaskTest.OBS_SOURCE); MarketDataId <object> timeSeriesId = TestObservableId.of("3", CalculationTaskTest.OBS_SOURCE); assertThat(timeSeries).hasSize(1); assertThat(timeSeries.GetEnumerator().next()).isEqualTo(timeSeriesId); }
public FunctionRequirements requirements(TestTarget target, ISet <Measure> measures, CalculationParameters parameters, ReferenceData refData) { return(FunctionRequirements.builder().valueRequirements(ImmutableSet.of(TestId.of("1"), TestObservableId.of("2"))).timeSeriesRequirements(TestObservableId.of("3")).observableSource(OBS_SOURCE).build()); }
public FunctionRequirements requirements(TestTarget target, CalculationParameters parameters, ReferenceData refData) { return(FunctionRequirements.builder().valueRequirements(TestObservableId.of("a"), TestObservableId.of("b")).timeSeriesRequirements(TestObservableId.of("c")).outputCurrencies(Currency.GBP).build()); }