Exemple #1
0
        internal void IsNotEmpty_Works()
        {
            _fakeValuer.Setup(
                m => m.Equals(true, true),
                Behavior.Returns(true));
            _fakeValuer.Setup(
                m => m.Compare(true, Arg.Any <bool?>()),
                Behavior.Set((object o1, object o2) =>
            {
                return((!o1.Equals(o2))
                        ? Tools.Randomizer.Create <IEnumerable <Difference> >()
                        : Enumerable.Empty <Difference>());
            }));

            _testInstance.IsNotEmpty(Tools.Randomizer.Create <string[]>());

            Tools.Asserter.Throws <AssertException>(
                () => _testInstance.IsNotEmpty(null));
            Tools.Asserter.Throws <AssertException>(
                () => _testInstance.IsNotEmpty(Array.Empty <string>()));
        }