public void ShouldHandleNullInput() { var estimator = new HtmlEstimator(); var time = estimator.ReadTimeInMinutes(null); time.Should().Be(0.0); }
public void ShouldHandleHumanResponseForEastAsianTextInput() { var estimator = new HtmlEstimator(); var readTime = estimator.HumanFriendlyReadTime("## 测试字符串"); readTime.Should().Be("less than a minute"); }
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); }
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); }
public void ShouldHandleImagesInput() { var expectedTimeInMinutes = 33 / 60.0; var estimator = new HtmlEstimator(); var time = estimator.ReadTimeInMinutes("<img /><img/> <Image></Image>"); time.Should().Be(expectedTimeInMinutes); }