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

The test FluentIterableTest.size should be split

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.4
    • 4.5.0-M1
    • Collection
    • 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

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              prodigysov Pengyu Nie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              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