示例#1
0
        public void ArgumentNotEmptySpanTest02()
        {
            try
            {
                var people = new Span <PersonProper>();

                people.ArgumentNotEmpty();

                Assert.Fail();
            }
            catch
            {
                Assert.IsTrue(true);
            }
        }
示例#2
0
        public void ArgumentNotNullSpanTest()
        {
            var people = new Span <PersonProper>(RandomData.GeneratePersonRefCollection <PersonProper>(10).ToArray());

            try
            {
                var result = people.ArgumentNotEmpty(nameof(people));
            }
            catch
            {
                Assert.Fail();
            }

            _ = Assert.ThrowsException <ArgumentNullException>(() => Span <PersonProper> .Empty.ArgumentNotEmpty());
        }
示例#3
0
        public void ArgumentNotEmptyParamSpanTest01()
        {
            try
            {
                Span <PersonProper> people = RandomData.GeneratePersonRefCollection <PersonProper>(10).ToArray();

                people.ArgumentNotEmpty();

                Assert.IsTrue(true);
            }
            catch
            {
                Assert.Fail();
            }
        }