0
|
1 using System;
|
|
2 using System.Linq;
|
|
3 using Data.Linq;
|
|
4
|
|
5 using NUnit.Framework;
|
|
6
|
|
7 namespace Data.Exceptions
|
|
8 {
|
|
9 [TestFixture]
|
|
10 public class ElementOperationTest : TestBase
|
|
11 {
|
|
12 [Test, ExpectedException(typeof(InvalidOperationException))]
|
|
13 public void First()
|
|
14 {
|
|
15 ForEachProvider(typeof(InvalidOperationException), db => db.Parent.First(p => p.ParentID == 100));
|
|
16 }
|
|
17
|
|
18 [Test, ExpectedException(typeof(InvalidOperationException))]
|
|
19 public void Single()
|
|
20 {
|
|
21 ForEachProvider(typeof(InvalidOperationException), db => db.Parent.Single());
|
|
22 }
|
|
23 }
|
|
24 }
|