public virtual void TestEndsWith() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("do")); q.Descend("str").Constraints().EndsWith(true); Expect(q, new int[] { }); q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("od")); q.Descend("str").Constraints().EndsWith(true); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("dod")); q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("D")); q.Descend("str").Constraints().EndsWith(false); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("dod")); q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("dodo")); // COR-413 q.Descend("str").Constraints().EndsWith(false); Expect(q, new int[] { }); }
public virtual void TestEquals() { var q = NewQuery(); q.Constrain(_array[0]); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestEndsWith() { var q = NewQuery(); q.Constrain(new STStringTestCase ("do")); q.Descend("str").Constraints().EndsWith(true); Expect(q, new int[] {}); q = NewQuery(); q.Constrain(new STStringTestCase ("od")); q.Descend("str").Constraints().EndsWith(true); SodaTestUtil.ExpectOne(q, new STStringTestCase ("dod")); q = NewQuery(); q.Constrain(new STStringTestCase ("D")); q.Descend("str").Constraints().EndsWith(false); SodaTestUtil.ExpectOne(q, new STStringTestCase ("dod")); q = NewQuery(); q.Constrain(new STStringTestCase ("dodo")); // COR-413 q.Descend("str").Constraints().EndsWith(false); Expect(q, new int[] {}); }
public virtual void TestSmaller() { var q = NewQuery(); q.Constrain(new STByteTestCase(1)); q.Descend(Descendant).Constraints().Smaller(); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestEquals() { var q = NewQuery(); q.Constrain(new STByteWUTestCase (0)); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestEquals() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STByteWUTestCase ((byte)0)); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestEqualsTrue() { var q = NewQuery(); q.Constrain(new STBooleanTestCase (true)); SodaTestUtil.ExpectOne(q, new STBooleanTestCase (true)); }
public virtual void TestSmaller() { var q = NewQuery(); q.Constrain(new STIntegerWUTestCase (1)); q.Descend("i_int").Constraints().Smaller(); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestSmaller() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase ((char)1)); q.Descend(Descendant).Constraints().Smaller(); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestSmaller() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase(( byte)1)); q.Descend(Descendant).Constraints().Smaller(); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestEqualsTrue() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STBooleanTestCase (true)); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STBooleanTestCase (true)); }
public virtual void TestEqualsTrue() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STBooleanWUTestCase (true)); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STBooleanWUTestCase (true)); }
public virtual void TestNull() { var q = NewQuery(); q.Constrain(new STStringTestCase (null)); q.Descend("str").Constrain(null); SodaTestUtil.ExpectOne(q, new STStringTestCase (null)); }
public virtual void TestEvaluation() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase (null)); q.Constrain(new _IEvaluation_187()); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("dod")); }
public virtual void TestNull() { var q = NewQuery(); q.Constrain(new STBooleanWUTestCase ()); q.Descend(Descendant).Constrain(null); SodaTestUtil.ExpectOne(q, new STBooleanWUTestCase ()); }
public virtual void TestContains() { var q = NewQuery(); q.Constrain(new STStringTestCase ("od")); q.Descend("str").Constraints().Contains(); SodaTestUtil.ExpectOne(q, new STStringTestCase ("dod")); }
public virtual void TestCaseInsenstiveContains() { IQuery q = NewQuery(); q.Constrain(typeof(Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase )); q.Constrain(new _IEvaluation_199()); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("dod")); }
public virtual void TestBothNull() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Typedhierarchy.STRTH1TestCase ()); q.Descend("foo1").Constrain(null); q.Descend("h2").Constrain(null); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestContains() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("od")); q.Descend("str").Constraints().Contains(); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STStringTestCase ("dod")); }
public virtual void TestNull() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STBooleanWUTestCase ()); q.Descend(Descendant).Constrain(null); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STBooleanWUTestCase ()); }
public virtual void TestEvaluation() { var q = NewQuery(); q.Constrain(new STStringTestCase (null)); q.Constrain(new _IEvaluation_187()); SodaTestUtil.ExpectOne(q, new STStringTestCase ("dod")); }
public virtual void TestBothNull() { var q = NewQuery(); q.Constrain(new STTH1TestCase ()); q.Descend("foo1").Constrain(null); q.Descend("h2").Constrain(null); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestCaseInsenstiveContains() { var q = NewQuery(); q.Constrain(typeof(STStringTestCase )); q.Constrain(new _IEvaluation_199()); SodaTestUtil.ExpectOne(q, new STStringTestCase ("dod")); }
public virtual void TestContains() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STStringUTestCase ("od")); q.Descend("str").Constraints().Contains(); SodaTestUtil.ExpectOne(q, new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STStringUTestCase ("dod")); }
public virtual void TestDescendantEquals() { var q = NewQuery(); q.Constrain(new STStringTestCase ()); q.Descend("str").Constrain("bbb"); SodaTestUtil.ExpectOne(q, new STStringTestCase ("bbb")); }
/// <summary> /// Magic: /// Execute any node in the query graph. /// </summary> /// <remarks> /// Magic: /// Execute any node in the query graph. /// The data for this example can be found in STTH1.java. /// </remarks> public virtual void TestExecuteAnyNode() { IQuery q = NewQuery(); q.Constrain(new STTH1TestCase().CreateData()[5]); q = q.Descend("h2").Descend("h3"); // We only get one STTH3 here, because the query is // constrained by the STTH2 with the "str2" member. SodaTestUtil.ExpectOne(q, new STTH3("str3")); }
public virtual void TestEquals() { var q = NewQuery(); q.Constrain(new STByteTestCase(0)); // Primitive default values are ignored, so we need an // additional constraint: q.Descend(Descendant).Constrain((byte)0); SodaTestUtil.ExpectOne(q, _array[0]); }
public virtual void TestOrAndOr() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Joins.Untyped.STOrUTestCase(null , null)); (q.Descend("orInt").Constrain(5).Or(q.Descend("orString").Constrain(null))).And(q .Descend("orInt").Constrain(int.MaxValue - 1).Or(q.Descend("orString").Constrain ("joho"))); SodaTestUtil.ExpectOne(q, _array[4]); }
public virtual void TestOrAndOr() { var q = NewQuery(); q.Constrain(new STOrUTestCase(null , null)); (q.Descend("orInt").Constrain(5).Or(q.Descend("orString").Constrain(null))).And(q .Descend("orInt").Constrain(int.MaxValue - 1).Or(q.Descend("orString").Constrain ("joho"))); SodaTestUtil.ExpectOne(q, _array[4]); }
public virtual void TestEquals() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase(( byte)0)); // Primitive default values are ignored, so we need an // additional constraint: q.Descend(Descendant).Constrain((byte)0); SodaTestUtil.ExpectOne(q, _array[0]); }