コード例 #1
0
        public void NormalizeAfterFinalization_InvalidFactor()
        {
            Relevance rel = new Relevance(8);

            rel.Finalize(16);
            Assert.Throws <ArgumentOutOfRangeException>(() => { rel.NormalizeAfterFinalization(-0.5F); });
        }
コード例 #2
0
        public void NormalizeAfterFinalization_InvalidFactor()
        {
            Relevance rel = new Relevance(8);

            rel.Finalize(16);
            rel.NormalizeAfterFinalization(-0.5F);
        }
コード例 #3
0
        public void NormalizeAfterFinalization_BeforeFinalize()
        {
            Relevance sut = new Relevance(8);
            var       ex  = Assert.Throws <InvalidOperationException>(() => sut.NormalizeAfterFinalization(0.5F));

            Assert.Equal("Normalization can be performed only after finalization.", ex.Message);
        }
コード例 #4
0
ファイル: RelevanceTests.cs プロジェクト: mono/ScrewTurnWiki
 public void NormalizeAfterFinalization()
 {
     Relevance rel = new Relevance(8);
     rel.Finalize(16);
     rel.NormalizeAfterFinalization(0.5F);
     Assert.AreEqual(25, rel.Value, 0.1, "Wrong value");
 }
コード例 #5
0
        public void NormalizeAfterFinalization()
        {
            Relevance rel = new Relevance(8);

            rel.Finalize(16);
            rel.NormalizeAfterFinalization(0.5F);
            Assert.AreEqual(25, rel.Value, 0.1, "Wrong value");
        }
コード例 #6
0
        public void NormalizeAfterFinalization()
        {
            Relevance rel = new Relevance(8);

            rel.Finalize(16);
            rel.NormalizeAfterFinalization(0.5F);
            Assert.Equal(25, rel.Value, 1);
        }
コード例 #7
0
        public void NormalizeAfterFinalization_BeforeFinalize()
        {
            Relevance rel = new Relevance(8);

            rel.NormalizeAfterFinalization(0.5F);
        }
コード例 #8
0
        public void NormalizeAfterFinalization_BeforeFinalize()
        {
            Relevance rel = new Relevance(8);

            Assert.Throws <InvalidOperationException>(() => { rel.NormalizeAfterFinalization(0.5F); });
        }
コード例 #9
0
ファイル: RelevanceTests.cs プロジェクト: mono/ScrewTurnWiki
 public void NormalizeAfterFinalization_InvalidFactor()
 {
     Relevance rel = new Relevance(8);
     rel.Finalize(16);
     rel.NormalizeAfterFinalization(-0.5F);
 }
コード例 #10
0
ファイル: RelevanceTests.cs プロジェクト: mono/ScrewTurnWiki
 public void NormalizeAfterFinalization_BeforeFinalize()
 {
     Relevance rel = new Relevance(8);
     rel.NormalizeAfterFinalization(0.5F);
 }