예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldParseCorrectly()
        public virtual void ShouldParseCorrectly()
        {
            ThresholdConfigParser.ThresholdConfigValue value = ThresholdConfigParser.Parse("25 files");
            assertEquals("files", value.Type);
            assertEquals(25, value.Value);

            value = ThresholdConfigParser.Parse("4g size");
            assertEquals("size", value.Type);
            assertEquals(1L << 32, value.Value);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldThrowExceptionOnUnknownType()
        public virtual void ShouldThrowExceptionOnUnknownType()
        {
            try
            {
                ThresholdConfigParser.Parse("more than one spaces is invalid");
                fail("Should not parse unknown types");
            }
            catch (System.ArgumentException)
            {
                // good
            }
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReturnKeepOneEntryForFalse()
        public virtual void ShouldReturnKeepOneEntryForFalse()
        {
            ThresholdConfigParser.ThresholdConfigValue value = ThresholdConfigParser.Parse("false");
            assertEquals("entries", value.Type);
            assertEquals(1, value.Value);
        }
예제 #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReturnNoPruningForTrue()
        public virtual void ShouldReturnNoPruningForTrue()
        {
            ThresholdConfigParser.ThresholdConfigValue value = ThresholdConfigParser.Parse("true");
            assertSame(ThresholdConfigParser.ThresholdConfigValue.NoPruning, value);
        }