Esempio n. 1
0
        public void Single_should_throw_when_aggregate_is_null(
            [Values(false, true)] bool async)
        {
            IAggregateFluent <Person> subject = null;

            Action action;

            if (async)
            {
                action = () => subject.SingleAsync().GetAwaiter().GetResult();
            }
            else
            {
                action = () => subject.Single();
            }

            action.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("aggregate");
        }