Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-737

The test FluentIterableTest.size should be split

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4
    • Fix Version/s: 4.5
    • Component/s: Collection
    • Labels:
      None

      Description

      The first part of FluentIterableTest.size is not testing function
      FluentIterable.size (see code copied below). Actually,
      FluentIterable.size will not be invoked at all, because
      FluentIterable.of(null) will throw an NPE before that. This part
      should be extracted as a separate unit test like
      FluentIterableTest.ofNull.

      try {
          FluentIterable.of((Iterable<?>) null).size();
          fail("expecting NullPointerException");
      } catch (final NullPointerException npe) {
          // expected
      }

      I'll create a pull request for this issue.

        Attachments

          Activity

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              prodigysov Pengyu Nie

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m

                  Issue deployment