示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldPrintADotEveryHalfPercentAndFullPercentageEveryTenPercentEvenWhenStepResolutionIsLower()
        public virtual void ShouldPrintADotEveryHalfPercentAndFullPercentageEveryTenPercentEvenWhenStepResolutionIsLower()
        {
            // given
            StringWriter     writer           = new StringWriter();
            ProgressListener progressListener = ProgressMonitorFactory.Textual(writer).singlePart(TestName.MethodName, 50);

            // when
            for (int i = 0; i < 50; i++)
            {
                progressListener.Add(1);
            }

            // then
            assertEquals(TestName.MethodName + lineSeparator() + _expectedTextualOutput, writer.ToString());
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldPrintADotEveryHalfPercentAndFullPercentageEveryTenPercentWithTextualIndicator() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldPrintADotEveryHalfPercentAndFullPercentageEveryTenPercentWithTextualIndicator()
        {
            // given
            MemoryStream     stream           = new MemoryStream();
            ProgressListener progressListener = ProgressMonitorFactory.Textual(stream).singlePart(TestName.MethodName, 1000);

            // when
            for (int i = 0; i < 1000; i++)
            {
                progressListener.Add(1);
            }

            // then
            assertEquals(TestName.MethodName + lineSeparator() + _expectedTextualOutput, stream.ToString(Charset.defaultCharset().name()));
        }