示例#1
0
        public void Constructor_NullParser_Throws()
        {
            BoundedIntParser nullParser = null;

            Assert.Throws <ArgumentNullException>(
                () => new MillisecondsParser(nullParser));
        }
        public MillisecondsParser(BoundedIntParser boundedIntParser)
        {
            if (boundedIntParser == null)
            {
                throw new ArgumentNullException(nameof(boundedIntParser));
            }

            this.boundedIntParser = boundedIntParser;
        }