Esempio n. 1
0
        public void ShouldHandleNullInput()
        {
            var estimator = new HtmlEstimator();
            var time      = estimator.ReadTimeInMinutes(null);

            time.Should().Be(0.0);
        }
Esempio n. 2
0
        public void ShouldHandleWhitespaceInput()
        {
            var estimator = new HtmlEstimator();
            var time      = estimator.ReadTimeInMinutes("        ");

            time.Should().Be(0.0);
        }
        public void ShouldHandleEastAsianTextInput()
        {
            var expectedTimeInMinutes = 5 / 500.0;
            var estimator             = new HtmlEstimator();
            var time = estimator.ReadTimeInMinutes("## 测试字符串");

            time.Should().Be(expectedTimeInMinutes);
        }
        public void ShouldHandlePlainTextInput()
        {
            var expectedTimeInMinutes = 2 / 275.0;
            var estimator             = new HtmlEstimator();
            var time = estimator.ReadTimeInMinutes("# Test String");

            time.Should().Be(expectedTimeInMinutes);
        }
Esempio n. 5
0
        public void ShouldHandleMoreThenTenImagesInput()
        {
            var expectedTimeInMinutes = 201 / 60.0;
            var estimator             = new HtmlEstimator();
            var time = estimator.ReadTimeInMinutes("<Image/><Image/><Image/><Image/><Image/><img/><img/><img/><img/><img/><img/>");

            time.Should().Be(expectedTimeInMinutes);
        }
Esempio n. 6
0
        public void ShouldHandleImagesInput()
        {
            var expectedTimeInMinutes = 33 / 60.0;
            var estimator             = new HtmlEstimator();
            var time = estimator.ReadTimeInMinutes("<img /><img/> <Image></Image>");

            time.Should().Be(expectedTimeInMinutes);
        }