public void TestNumericRandom() { Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("seed", "1"); parameters.Add("sampleSize", "12"); RandomSampling sampling = new RandomSampling(); sampling.setSamplingParameters(parameters); testNumeric(sampling, EXPECTED_RANDOM_12_1); parameters.Clear(); parameters.Add("seed", "0"); parameters.Add("sampleSize", "10"); sampling.setSamplingParameters(parameters); testNumeric(sampling, EXPECTED_RANDOM_10_0); }
public static bool TestNumericRandom(string solver, int expected, int seed, int sampleSize) { string loc = resolvePath(solver, "RandomSampling" + seed.ToString() + sampleSize.ToString() + ".csv"); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("seed", seed.ToString()); parameters.Add("sampleSize", sampleSize.ToString()); RandomSampling sampling = new RandomSampling(); sampling.setSamplingParameters(parameters); List <Configuration> result = testNumeric(sampling); List <Configuration> expectedSample = ConfigurationReader.readConfigurations_Header_CSV(loc, GlobalState.varModel); return(containsAllMeasurements(result, expectedSample) && result.Count == expected); }