public void SelectBlob() { using (new SoodaTransaction()) { byte[] b = (from e in EightFields.Linq() where e.Id == 1 select e.Blob).Single(); CollectionAssert.AreEqual(new byte[] { 0xf }, b); } }
public void SelectGuid() { using (new SoodaTransaction()) { Guid g = (from e in EightFields.Linq() where e.Id == 1 select e.Guid).Single(); Assert.AreEqual(new Guid("757A29AF-2BB2-4974-829A-A944CF741265"), g); } }
public void SelectTimeSpan() { using (new SoodaTransaction()) { TimeSpan t = (from e in EightFields.Linq() where e.Id == 1 select e.TimeSpan).Single(); Assert.AreEqual(TimeSpan.FromHours(1), t); } }
public void TimeSpanCompare() { using (new SoodaTransaction()) { int c = EightFields.Linq().Count(e => e.TimeSpan == TimeSpan.FromHours(1)); Assert.AreEqual(1, c); } }
public void SelectMinNullableTimeSpan() { using (new SoodaTransaction()) { TimeSpan?result = EightFields.Linq().Where(e => e.Id == 1).Select(e => (TimeSpan?)e.TimeSpan).Min(); Assert.AreEqual(TimeSpan.FromHours(1), result); } }
public void MinTimeSpan() { using (new SoodaTransaction()) { TimeSpan result = EightFields.Linq().Where(e => e.Id == 1).Min(e => e.TimeSpan); Assert.AreEqual(TimeSpan.FromHours(1), result); } }