Example #1
0
        protected void getError_Click(object sender, EventArgs e)
        {
            SampleValues sampValsIn  = fillSampleValues(new SampleValues());
            SampleValues sampValsOut = Sample.ErrorSize(sampValsIn);

            fillForm(sampValsOut);
        }
Example #2
0
 protected void fillForm(SampleValues sampVals)
 {
     minRangeValue.Text     = sampVals.minRngVal.ToString();
     maxRangeValue.Text     = sampVals.maxRngVal.ToString();
     sample_n.Text          = sampVals.n.ToString();
     confidence.Text        = sampVals.c.ToString();
     error.Text             = sampVals.e.ToString();
     population_N.Text      = sampVals.N.ToString();
     standardDeviation.Text = sampVals.s.ToString();
 }
Example #3
0
        protected SampleValues fillSampleValues(SampleValues sampVals)
        {
            double min, max, c, err, s, N, n;

            System.Double.TryParse(minRangeValue.Text, out min);
            System.Double.TryParse(maxRangeValue.Text, out max);
            System.Double.TryParse(confidence.Text, out c);
            System.Double.TryParse(error.Text, out err);
            System.Double.TryParse(standardDeviation.Text, out s);
            System.Double.TryParse(population_N.Text, out N);
            System.Double.TryParse(sample_n.Text, out n);

            if (min != 0)
            {
                sampVals.minRngVal = min;
            }
            if (max != 0)
            {
                sampVals.maxRngVal = max;
            }
            if (c != 0)
            {
                sampVals.c = c;
            }
            if (err != 0)
            {
                sampVals.e = err;
            }
            if (s != 0)
            {
                sampVals.s = s;
            }
            if (N != 0)
            {
                sampVals.N = N;
            }
            if (n != 0)
            {
                sampVals.n = n;
            }
            return(sampVals);
        }
Example #4
0
        public void Execute()
        {
            ValidateProperties();

            Executor executor = new Executor()
            {
                Comparer           = Comparer,
                Creator            = Creator,
                ThrowOnKeyNotFound = ThrowOnKeyNotFound,
                Values             = SampleValues.ToArray()
            };

            SeparateKeys(
                out executor.ExcludedKey,
                out executor.ConflictingKeys,
                out executor.NonConflictingKeys
                );

            executor.TestAdd1();
            executor.TestAdd1ThrowsArgumentExceptionIfKeyAlreadyInDictionary();
            executor.TestAdd2();
            executor.TestClear();
            executor.TestContains();
            executor.TestContainsKey();
            executor.TestCopyTo();
            executor.TestCountProperty();
            executor.TestGetEnumerator();
            executor.TestGetEnumeratorGeneric();
            executor.TestIsReadOnlyProperty();

            if (!SkipItemPropertyTest)
            {
                executor.TestItemProperty();
            }

            executor.TestKeysProperty();
            executor.TestRemove1();
            executor.TestRemove2();
            executor.TestTryGetValue();
            executor.TestValuesProperty();
        }