Esempio n. 1
0
        public void NonAtomicFalse()
        {
            var sequenceQuery = Substitute.For<IMutableSingleObjectQuery<string>>();

            var query = new ReplaceQuery<string>(
                sequenceQuery,
                "Jackpot!",
                false);

            var term = query.GenerateTerm(datumConverterFactory);

            var nonAtomicArgs = term.optargs.Where(kv => kv.key == "non_atomic");
            Assert.That(nonAtomicArgs.Count(), Is.EqualTo(0));
        }
Esempio n. 2
0
        public void NonAtomicFalse()
        {
            var sequenceQuery = Substitute.For <IMutableSingleObjectQuery <string> >();

            var query = new ReplaceQuery <string>(
                sequenceQuery,
                "Jackpot!",
                false);

            var term = query.GenerateTerm(queryConverter);

            var nonAtomicArgs = term.optargs.Where(kv => kv.key == "non_atomic");

            Assert.That(nonAtomicArgs.Count(), Is.EqualTo(0));
        }
Esempio n. 3
0
        public void NonAtomicTrue()
        {
            var sequenceQuery = Substitute.For<IMutableSingleObjectQuery<string>>();

            var query = new ReplaceQuery<string>(
                sequenceQuery,
                "Jackpot!",
                true);

            var term = query.GenerateTerm(datumConverterFactory);

            var nonAtomicArgs = term.optargs.Where(kv => kv.key == "non_atomic");
            Assert.That(nonAtomicArgs.Count(), Is.EqualTo(1));

            var nonAtomicArg = nonAtomicArgs.Single();

            Assert.That(nonAtomicArg.val, Is.Not.Null);
            Assert.That(nonAtomicArg.val.type, Is.EqualTo(Term.TermType.DATUM));
            Assert.That(nonAtomicArg.val.datum, Is.Not.Null);
            Assert.That(nonAtomicArg.val.datum.type, Is.EqualTo(Datum.DatumType.R_BOOL));
            Assert.That(nonAtomicArg.val.datum.r_bool, Is.True);
        }
Esempio n. 4
0
        public void NonAtomicTrue()
        {
            var sequenceQuery = Substitute.For <IMutableSingleObjectQuery <string> >();

            var query = new ReplaceQuery <string>(
                sequenceQuery,
                "Jackpot!",
                true);

            var term = query.GenerateTerm(queryConverter);

            var nonAtomicArgs = term.optargs.Where(kv => kv.key == "non_atomic");

            Assert.That(nonAtomicArgs.Count(), Is.EqualTo(1));

            var nonAtomicArg = nonAtomicArgs.Single();

            Assert.That(nonAtomicArg.val, Is.Not.Null);
            Assert.That(nonAtomicArg.val.type, Is.EqualTo(Term.TermType.DATUM));
            Assert.That(nonAtomicArg.val.datum, Is.Not.Null);
            Assert.That(nonAtomicArg.val.datum.type, Is.EqualTo(Datum.DatumType.R_BOOL));
            Assert.That(nonAtomicArg.val.datum.r_bool, Is.True);
        }