Пример #1
0
        public void describe_Conjunction()
        {
            WhenTakingConjunction(
                of: RefinementSet.Empty,
                with: RefinementSet.Empty,
                itProduces: Refinement.FromVariableNames()
                );

            WhenTakingConjunction(
                of: RefinementSet.From(("x", SqlDataType.Int)),
                with: RefinementSet.Empty,
                itProduces: Refinement.FromVariableNames(("x", SqlDataType.Int))
                );

            WhenTakingConjunction(
                of: RefinementSet.Empty,
                with: RefinementSet.From(("x", SqlDataType.Int)),
                itProduces: Refinement.FromVariableNames(("x", SqlDataType.Int))
                );

            WhenTakingConjunction(
                of: RefinementSet.From(("x", SqlDataType.Int)),
                with: RefinementSet.From(("y", SqlDataType.Int)),
                itProduces: Refinement.FromVariableNames(("x", SqlDataType.Int), ("y", SqlDataType.Int))
                );

            WhenTakingConjunction(
                of: RefinementSet.From(("x", KnownSetDecoratorDataType.IntExcludingSet(1, 2))),
                with: RefinementSet.From(("x", KnownSetDecoratorDataType.IntExcludingSet(3, 4))),
                itProduces: Refinement.FromVariableNames(("x", KnownSetDecoratorDataType.IntExcludingSet(1, 2, 3, 4)))
                );

            WhenTakingConjunction(
                of: RefinementSet.From(("x", KnownSetDecoratorDataType.IntIncludingSet(1, 2))),
                with: RefinementSet.From(("x", KnownSetDecoratorDataType.IntIncludingSet(3, 4))),
                itProduces: Refinement.FromVariableNames()
                );

            WhenTakingConjunction(
                of: RefinementSet.From(("x", KnownSetDecoratorDataType.IntIncludingSet(1, 2))),
                with: RefinementSet.From(("x", NullDataType.Instance)),
                itProduces: Refinement.FromVariableNames()
                );
        }
Пример #2
0
        public void describe_Disjunction()
        {
            WhenTakingDisjunction(
                of: RefinementSet.Empty,
                with: RefinementSet.Empty,
                itProduces: Refinement.FromVariableNames()
                );

            WhenTakingDisjunction(
                of: RefinementSet.From(
                    ("y", SqlDataType.VarChar),
                    ("x", KnownSetDecoratorDataType.IntIncludingSet(1, 2))
                    ),
                with: RefinementSet.Empty,
                itProduces: Refinement.FromVariableNames()
                );

            WhenTakingDisjunction(
                of: RefinementSet.From(("x", KnownSetDecoratorDataType.IntIncludingSet(1, 2))),
                with: RefinementSet.From(("x", new NullableDataType(KnownSetDecoratorDataType.IntIncludingSet(3, 4)))),
                itProduces: Refinement.FromVariableNames(("x", new NullableDataType(KnownSetDecoratorDataType.IntIncludingSet(1, 2, 3, 4))))
                );
        }