public void HowManyPagesLeft_When_overlapped_ranges_are_a0dded_Then_returns_correct_count_of_unread_pages() { var book = new Book(10); book.AddRange(3, 4); book.AddRange(3, 10); var leftPages = book.HowManyPagesLeft(); Assert.That(leftPages, Is.EqualTo(2)); }
public void HowManyPagesLeft_When_overlapped_ranges_added_Then_returns_correct_count_of_unread_pages(int from1, int to1, int from2, int to2, int pageCount, int expected) { var book = new Book(pageCount); book.AddRange(from1, to1); book.AddRange(from2, to2); var leftPages = book.HowManyPagesLeft(); Assert.That(leftPages, Is.EqualTo(expected)); }
public void HowManyPagesLeft_When_had_not_give_few_read_ranges_Then_returns_correct_count_of_unread_pages() { // Arrange var book = new Book(10); // Act var leftPages = book.HowManyPagesLeft(); //Assert Assert.That(leftPages, Is.EqualTo(0)); }
public void HowManyPagesLeft_When_given_few_read_ranges_that_overlapped_Then_returns_correct_count_of_unread_pages() { // Arrange var book = new Book(10); book.AddRange(1,5); book.AddRange(2,8); // Act var leftPages = book.HowManyPagesLeft(); //Assert Assert.That(leftPages,Is.EqualTo(2)); }
public void HowMushPagesLeft_When_overlap_few_page_Then_should_be_right_page_say() { // Arrange var book = new Book(10); book.AddRange(3, 7); book.AddRange(7, 9); // Act var leftPages = book.HowManyPagesLeft(); // Assert Assert.AreEqual(1,leftPages); }
public void HowManyPagesLeft_When_give_overlapped_ranges_Then_correct_count_of_unread_pages() { // Arrange var book = new Book(10); book.AddRange(3, 5); book.AddRange(4, 8); // Act var leftPages = book.HowManyPagesLeft(); // Assert Assert.That(leftPages, Is.EqualTo(4)); }
public void Crl_HowManyPagesLeft_Should_correctly_counts_pages_When_overlapped_ranges() { // Arrange var book = new Book(50); book.AddRange(1, 40); book.AddRange(6, 8); // Act var leftPages = book.HowManyPagesLeft(); // Assert Assert.That(leftPages, Is.EqualTo(10)); }
public void HowManyPagesLeft_When_given_overlapped_ranges_Then_returns_correct_count_of_unread_pages() { // Arrange Book book = new Book(8); book.AddRange(4,6); book.AddRange(5,10); // Act int leftPages = book.HowManyPagesLeft(); //Assert Assert.That(leftPages,Is.EqualTo(3)); }
public void HowManyPagesLeftOverlapped_When_overlapped_ranges_are_added_Then_returns_correct_count_of_unread_pages() { // Arrange var book = new Book(20); book.AddRange(4, 7); book.AddRange(5, 10); book.AddRange(6, 11); book.AddRange(5, 7); // Act var leftPages = book.HowManyPagesLeft(); // Assert Assert.That(leftPages, Is.EqualTo(12)); }