"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _index = _interopRequireDefault(require("../../lib/stream/index"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/*
  ======== A Handy Little Nodeunit Reference ========
  https://github.com/caolan/nodeunit

  Test methods:
    test.expect(numAssertions)
    test.done()
  Test assertions:
    test.ok(value, [message])
    test.equal(actual, expected, [message])
    test.notEqual(actual, expected, [message])
    test.deepEqual(actual, expected, [message])
    test.notDeepEqual(actual, expected, [message])
    test.strictEqual(actual, expected, [message])
    test.notStrictEqual(actual, expected, [message])
    test.throws(block, [error], [message])
    test.doesNotThrow(block, [error], [message])
    test.ifError(value)
*/
var _default = exports["default"] = {
  setUp: function setUp(done) {
    done();
  },
  'endOfStream for empty stream': function endOfStream_for_empty_stream(test) {
    test.expect(1);
    // tests here
    test.ok(_index["default"].buffered(_index["default"].ofString('')).endOfStream(0), 'should be endOfStream.');
    test.done();
  },
  'endOfStream for non empty stream': function endOfStream_for_non_empty_stream(test) {
    test.expect(1);
    // tests here
    test.ok(_index["default"].buffered(_index["default"].ofString('1')).endOfStream(1), 'should be endOfStream.');
    test.done();
  },
  'no endOfStream for non empty stream': function no_endOfStream_for_non_empty_stream(test) {
    test.expect(1);
    // tests here
    test.equal(_index["default"].buffered(_index["default"].ofString('1')).endOfStream(0), false, 'should be endOfStream.');
    test.done();
  },
  'get from stream': function (test) {
    test.expect(1);
    // tests here
    test.equal(_index["default"].buffered(_index["default"].ofString('1')).get(0).isSuccess(), true, 'should be a success.');
    test.done();
  },
  'do not get from empty stream': function do_not_get_from_empty_stream(test) {
    test.expect(1);
    // tests here
    test.equal(_index["default"].buffered(_index["default"].ofString('1')).get(1).isSuccess(), false, 'should be a failure.');
    test.done();
  },
  'get from stream number 1': function (test) {
    test.expect(1);
    // tests here
    test.equal(_index["default"].buffered(_index["default"].ofString('123')).get(0).success(), '1', 'should be a 1.');
    test.done();
  },
  'get from stream number is cached': function (test) {
    test.expect(1);
    // tests here
    var s = _index["default"].buffered(_index["default"].ofString('123')),
      v = s.get(0);
    test.strictEqual(s.get(0), v, 'should be a the same object.');
    test.done();
  }
};
//# sourceMappingURL=buffered_stream_test.js.map