Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
 public void TimeSpanCompare()
 {
     using (new SoodaTransaction())
     {
         int c = EightFields.Linq().Count(e => e.TimeSpan == TimeSpan.FromHours(1));
         Assert.AreEqual(1, c);
     }
 }
Exemplo n.º 5
0
 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);
     }
 }
Exemplo n.º 6
0
 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);
     }
 }