public void SaveToBooleanInvalidValueTest()
        {
            var expected = RandomValueEx.GetRandomBoolean();
            var actual   = "InvalidValue".SaveToBoolean(expected);

            Assert.Equal(expected, actual);
        }
        public void PopulateCollectionsTest()
        {
            var expeted = RandomValueEx.GetRandomBoolean();

            InstanceCreator.PopulateCollections = expeted;
            InstanceCreator.PopulateCollections.Should()
            .Be(expeted);
            InstanceCreator.PopulateCollections = true;
        }
        public void SaveToBooleanTest()
        {
            var expected = RandomValueEx.GetRandomBoolean();
            var actual   = expected.ToString()
                           .SaveToBoolean();

            actual
            .Should()
            .Be(expected);
        }
        public void ToBooleanTest()
        {
            var value  = RandomValueEx.GetRandomBoolean();
            var actual = value.ToString()
                         .ToBoolean();

            actual
            .Should()
            .Be(value);
        }
        public void TryParsBooleanTest()
        {
            var expected = RandomValueEx.GetRandomBoolean();
            // ReSharper disable once RedundantAssignment
            var actual = expected.ToString()
                         .TryParsBoolean(out var outValue);

            actual
            .Should()
            .BeTrue();

            outValue
            .Should()
            .Be(expected);
        }
Beispiel #6
0
 // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
 public void GetRandomBooleanTest() => RandomValueEx.GetRandomBoolean();