コード例 #1
0
        public void GetResult_LargerList_3Members()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(3, 3);

            sampler.Build(values);

            Assert.That(sampler.GetResult().Count(), Is.EqualTo(3));
        }
コード例 #2
0
        public void IsSampled_EmptyList_False()
        {
            var values = new int[0];

            var sampler = new BasicSampler <int>(20, 20);

            sampler.Build(values);

            Assert.That(sampler.GetIsSampled, Is.False);
        }
コード例 #3
0
        public void GetExcludedRowCount_EmptyList_0()
        {
            var values = new int[0];

            var sampler = new BasicSampler <int>(20, 20);

            sampler.Build(values);

            Assert.That(sampler.GetExcludedRowCount, Is.EqualTo(0));
        }
コード例 #4
0
        public void GetExcludedRowCount_NonEmptyList_0()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(20, 20);

            sampler.Build(values);

            Assert.That(sampler.GetExcludedRowCount, Is.EqualTo(0));
        }
コード例 #5
0
        public void GetResult_EmptyList_Empty()
        {
            var values = new int[0];

            var sampler = new BasicSampler <int>(20, 20);

            sampler.Build(values);

            Assert.That(sampler.GetResult(), Is.Empty);
        }
コード例 #6
0
        public void GetExcludedRowCount_Threshold_0()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(15, 4);

            sampler.Build(values);

            Assert.That(sampler.GetExcludedRowCount, Is.EqualTo(0));
        }
コード例 #7
0
        public void IsSampled_NonEmptyList_False()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(20, 20);

            sampler.Build(values);

            Assert.That(sampler.GetIsSampled, Is.False);
        }
コード例 #8
0
        public void GetResult_NonEmptyList_Empty()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(20, 20);

            sampler.Build(values);

            Assert.That(sampler.GetResult().Count(), Is.EqualTo(10));
        }
コード例 #9
0
        public void IsSampled_Threshold_False()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(15, 4);

            sampler.Build(values);

            Assert.That(sampler.GetIsSampled, Is.False);
        }
コード例 #10
0
        public void GetResult_Threshold_3Members()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(15, 4);

            sampler.Build(values);

            Assert.That(sampler.GetResult().Count(), Is.EqualTo(10));
        }
コード例 #11
0
        public void GetExcludedRowCount_MaxSampled_7()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(3, 4);

            sampler.Build(values);

            Assert.That(sampler.GetExcludedRowCount, Is.EqualTo(6));
        }
コード例 #12
0
        public void IsSampled_MaxSampled_True()
        {
            var values = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var sampler = new BasicSampler <int>(3, 4);

            sampler.Build(values);

            Assert.That(sampler.GetIsSampled, Is.True);
        }