22using SharpRepository . Repository ;
33using System . Linq ;
44using SharpRepository . Repository . Transactions ;
5- using Should ;
5+ using Shouldly ;
66using SharpRepository . InMemoryRepository ;
77
88namespace SharpRepository . Samples
@@ -96,12 +96,12 @@ public void Add_Operations_Can_Be_Batched()
9696 {
9797 batch . Add ( new Order { Name = "Order 1" } ) ;
9898 batch . Add ( new Order { Name = "Order 2" } ) ;
99- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 0 ) ;
99+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 0 ) ;
100100
101101 batch . Commit ( ) ;
102102 }
103103
104- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 2 ) ;
104+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 2 ) ;
105105 }
106106
107107 [ Test ]
@@ -110,7 +110,7 @@ public void Update_Operations_Can_Be_Batched()
110110 var repo = new InMemoryRepository < Order , int > ( ) ;
111111 repo . Add ( new Order { Name = "Order 1" } ) ;
112112 repo . Add ( new Order { Name = "Order 2" } ) ;
113- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 2 ) ;
113+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 2 ) ;
114114
115115 using ( var batch = repo . BeginBatch ( ) )
116116 {
@@ -120,14 +120,14 @@ public void Update_Operations_Can_Be_Batched()
120120 batch . Update ( order ) ;
121121 }
122122
123- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 2 ) ;
124- repo . GetAll ( ) . Count ( x => x . Name . StartsWith ( "Update" ) ) . ShouldEqual ( 0 ) ;
123+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 2 ) ;
124+ repo . GetAll ( ) . Count ( x => x . Name . StartsWith ( "Update" ) ) . ShouldBe ( 0 ) ;
125125
126126 batch . Commit ( ) ;
127127 }
128128
129- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 2 ) ;
130- repo . GetAll ( ) . Count ( x => x . Name . StartsWith ( "Update" ) ) . ShouldEqual ( 2 ) ;
129+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 2 ) ;
130+ repo . GetAll ( ) . Count ( x => x . Name . StartsWith ( "Update" ) ) . ShouldBe ( 2 ) ;
131131 }
132132
133133 [ Test ]
@@ -138,7 +138,7 @@ public void Delete_Operations_Can_Be_Batched()
138138 repo . Add ( new Order { Name = "Order 1" } ) ;
139139 repo . Add ( new Order { Name = "Order 2" } ) ;
140140
141- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 2 ) ;
141+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 2 ) ;
142142
143143 using ( var batch = repo . BeginBatch ( ) )
144144 {
@@ -147,11 +147,11 @@ public void Delete_Operations_Can_Be_Batched()
147147 batch . Delete ( order ) ;
148148 }
149149
150- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 2 ) ;
150+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 2 ) ;
151151 batch . Commit ( ) ;
152152 }
153153
154- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 0 ) ;
154+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 0 ) ;
155155 }
156156
157157 /*
@@ -166,12 +166,12 @@ public void Batch_Can_Be_Rolled_Back()
166166 {
167167 batch . Add ( new Order { Name = "Order 1" } ) ;
168168 batch . Add ( new Order { Name = "Order 2" } ) ;
169- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 0 ) ;
169+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 0 ) ;
170170 batch . Rollback ( ) ;
171171 batch . Commit ( ) ;
172172 }
173173
174- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 0 ) ;
174+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 0 ) ;
175175 }
176176
177177 /*
@@ -189,7 +189,7 @@ public void Batch_Can_Be_Disregarded()
189189 batch . Add ( new Order { Name = "Order 2" } ) ;
190190 }
191191
192- repo . GetAll ( ) . Count ( ) . ShouldEqual ( 0 ) ;
192+ repo . GetAll ( ) . Count ( ) . ShouldBe ( 0 ) ;
193193 }
194194 }
195195}
0 commit comments