Ejemplo n.º 1
0
        public void NotExceedTicks_When_Called_Given_That_Result_Ticks_Arent_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            RunResult  measureResult = GetTestMeasureResult(2, 1);
            AssertPart assertPart    = new AssertPart(measureResult);

            // Act
            assertPart.NotExceedTotalTicks(3);
            assertPart.NotExceedTotalTicks(2);
        }
Ejemplo n.º 2
0
        public void NotExceedAverageSeconds_When_Called_Given_That_Result_Seconds_Arent_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            var        resultTime    = new TimeSpan(0, 0, 60);
            RunResult  measureResult = GetTestMeasureResult(resultTime.Ticks, 10);
            AssertPart assertPart    = new AssertPart(measureResult);

            // Act
            assertPart.NotExceedAverageSeconds(7);
        }
Ejemplo n.º 3
0
        public void NotExceedAverageTicks_When_Called_Given_That_Result_Ticks_Arent_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            RunResult  measureResult = GetTestMeasureResult(100, 20);
            AssertPart assertPart    = new AssertPart(measureResult);

            // Act
            assertPart.NotExceedAverageTicks(5);
            assertPart.NotExceedAverageTicks(6);
        }
Ejemplo n.º 4
0
        public void NotExceedMilliseconds_When_Called_Given_That_Result_Milliseconds_Arent_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            var        resultTime    = new TimeSpan(0, 0, 2);
            RunResult  measureResult = GetTestMeasureResult(resultTime.Ticks, 1);
            AssertPart assertPart    = new AssertPart(measureResult);

            // Act
            assertPart.NotExceedTotalMilliseconds(3000);
            assertPart.NotExceedTotalMilliseconds(2000);
        }
Ejemplo n.º 5
0
        public void Ctor_When_Called_Sets_MeasureResult()
        {
            // Arrange
            RunResult measureResult = GetTestMeasureResult(1, 1);

            // Act
            AssertPart assertPart = new AssertPart(measureResult);

            // Assert
            Assert.AreEqual(measureResult, assertPart.MeasureResult);
        }
Ejemplo n.º 6
0
        public void NotExceedTime_When_Called_Given_That_Result_Time_Arent_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            var        resultTime    = new TimeSpan(0, 2, 0);
            RunResult  measureResult = GetTestMeasureResult(resultTime.Ticks, 1);
            AssertPart assertPart    = new AssertPart(measureResult);

            // Act
            assertPart.NotExceedTotalTime(new TimeSpan(0, 3, 0));
            assertPart.NotExceedTotalTime(new TimeSpan(0, 2, 0));
        }
Ejemplo n.º 7
0
        public void NotExceedTicks_When_Called_Given_That_Result_Ticks_Are_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            RunResult  measureResult = GetTestMeasureResult(4, 1);
            AssertPart assertPart    = new AssertPart(measureResult);

            Assert.Catch <AssertionException>(() =>
            {
                // Act
                assertPart.NotExceedTotalTicks(2, "some description");
            });
        }
Ejemplo n.º 8
0
        public void NotExceedSeconds_When_Called_Given_That_Result_Seconds_Are_More_That_Provided_Max_Does_Not_Throw()
        {
            // Arrange
            var        resultTime    = new TimeSpan(0, 0, 2);
            RunResult  measureResult = GetTestMeasureResult(resultTime.Ticks, 1);
            AssertPart assertPart    = new AssertPart(measureResult);

            Assert.Catch <AssertionException>(() =>
            {
                // Act
                assertPart.NotExceedTotalSeconds(1, "some description");
            });
        }