Mercurial > pub > bltoolkit
annotate UnitTests/Fluent/MockDataBase/AssertDb.cs @ 1:8f65451dc28f
Исправлена проблема с фабрикой и выборкой нескольких объектов в linq выражении
author | cin |
---|---|
date | Fri, 28 Mar 2014 01:04:56 +0400 |
parents | f990fcb411a9 |
children |
rev | line source |
---|---|
0 | 1 using System.Linq; |
2 using Microsoft.VisualStudio.TestTools.UnitTesting; | |
3 | |
4 namespace BLToolkit.Fluent.Test.MockDataBase | |
5 { | |
6 public class AssertDb | |
7 { | |
8 private readonly MockDb _db; | |
9 | |
10 public AssertDb(MockDb db) | |
11 { | |
12 _db = db; | |
13 } | |
14 | |
15 public void AreAll(string message = null) | |
16 { | |
17 if (_db.Commands.Any(c => !c.IsUsing)) | |
18 { | |
19 Assert.Fail(message ?? "Fail all queries"); | |
20 } | |
21 } | |
22 } | |
23 } |