Ejemplo n.º 1
0
        public void GetRandomEnumINvalidTypeTest()
        {
            // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            Action test = () => RandomValueEx.GetRandomEnum <Int32>();

            test.ShouldThrow <ArgumentException>();
        }
        public void CtorTest()
        {
            var expected            = RandomValueEx.GetRandomEnum <MemberSelectionMode>();
            var expectedName        = RandomValueEx.GetRandomString();
            var expectedDescription = RandomValueEx.GetRandomString();
            var target = new AllMemberSelectionRule(expected, expectedName, expectedDescription);

            target.RuleName.Should()
            .Be(expectedName);
            target.RuleDescription.Should()
            .Be(expectedDescription);
        }
Ejemplo n.º 3
0
 // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
 public void GetRandomEnumTest() => RandomValueEx.GetRandomEnum <DayOfWeek>();