Skip to content

Commit 1795ea2

Browse files
committed
Code style changes.
1 parent be88f8a commit 1795ea2

File tree

2 files changed

+12
-48
lines changed

2 files changed

+12
-48
lines changed

tests/Magick.NET.Tests/MagickImageCollectionTests/TheWriteMethod.cs

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
2828
{
2929
using (var images = new MagickImageCollection())
3030
{
31-
Assert.Throws<ArgumentNullException>("file", () =>
32-
{
33-
images.Write((FileInfo)null);
34-
});
31+
Assert.Throws<ArgumentNullException>("file", () => images.Write((FileInfo)null));
3532
}
3633
}
3734

@@ -65,10 +62,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
6562
{
6663
using (var images = new MagickImageCollection())
6764
{
68-
Assert.Throws<ArgumentNullException>("file", () =>
69-
{
70-
images.Write((FileInfo)null, MagickFormat.Bmp);
71-
});
65+
Assert.Throws<ArgumentNullException>("file", () => images.Write((FileInfo)null, MagickFormat.Bmp));
7266
}
7367
}
7468

@@ -98,10 +92,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
9892
{
9993
using (var images = new MagickImageCollection())
10094
{
101-
Assert.Throws<ArgumentNullException>("stream", () =>
102-
{
103-
images.Write((Stream)null);
104-
});
95+
Assert.Throws<ArgumentNullException>("stream", () => images.Write((Stream)null));
10596
}
10697
}
10798
}
@@ -113,10 +104,7 @@ public void ShouldThrowExceptionWhenStreamIsNull()
113104
{
114105
using (var images = new MagickImageCollection())
115106
{
116-
Assert.Throws<ArgumentNullException>("stream", () =>
117-
{
118-
images.Write((Stream)null, MagickFormat.Bmp);
119-
});
107+
Assert.Throws<ArgumentNullException>("stream", () => images.Write((Stream)null, MagickFormat.Bmp));
120108
}
121109
}
122110

@@ -165,10 +153,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
165153
{
166154
using (var images = new MagickImageCollection())
167155
{
168-
Assert.Throws<ArgumentNullException>("fileName", () =>
169-
{
170-
images.Write((string)null);
171-
});
156+
Assert.Throws<ArgumentNullException>("fileName", () => images.Write((string)null));
172157
}
173158
}
174159
}
@@ -180,10 +165,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
180165
{
181166
using (var images = new MagickImageCollection())
182167
{
183-
Assert.Throws<ArgumentNullException>("fileName", () =>
184-
{
185-
images.Write((string)null, MagickFormat.Bmp);
186-
});
168+
Assert.Throws<ArgumentNullException>("fileName", () => images.Write((string)null, MagickFormat.Bmp));
187169
}
188170
}
189171

tests/Magick.NET.Tests/MagickImageTests/TheWriteMethod.cs

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
2828
{
2929
using (var image = new MagickImage())
3030
{
31-
Assert.Throws<ArgumentNullException>("file", () =>
32-
{
33-
image.Write((FileInfo)null);
34-
});
31+
Assert.Throws<ArgumentNullException>("file", () => image.Write((FileInfo)null));
3532
}
3633
}
3734

@@ -65,10 +62,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
6562
{
6663
using (var image = new MagickImage())
6764
{
68-
Assert.Throws<ArgumentNullException>("file", () =>
69-
{
70-
image.Write((FileInfo)null, MagickFormat.Bmp);
71-
});
65+
Assert.Throws<ArgumentNullException>("file", () => image.Write((FileInfo)null, MagickFormat.Bmp));
7266
}
7367
}
7468

@@ -98,10 +92,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
9892
{
9993
using (var image = new MagickImage())
10094
{
101-
Assert.Throws<ArgumentNullException>("stream", () =>
102-
{
103-
image.Write((Stream)null);
104-
});
95+
Assert.Throws<ArgumentNullException>("stream", () => image.Write((Stream)null));
10596
}
10697
}
10798
}
@@ -113,10 +104,7 @@ public void ShouldThrowExceptionWhenStreamIsNull()
113104
{
114105
using (var image = new MagickImage())
115106
{
116-
Assert.Throws<ArgumentNullException>("stream", () =>
117-
{
118-
image.Write((Stream)null, MagickFormat.Bmp);
119-
});
107+
Assert.Throws<ArgumentNullException>("stream", () => image.Write((Stream)null, MagickFormat.Bmp));
120108
}
121109
}
122110

@@ -150,10 +138,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
150138
{
151139
using (var image = new MagickImage())
152140
{
153-
Assert.Throws<ArgumentNullException>("fileName", () =>
154-
{
155-
image.Write((string)null);
156-
});
141+
Assert.Throws<ArgumentNullException>("fileName", () => image.Write((string)null));
157142
}
158143
}
159144

@@ -197,10 +182,7 @@ public void ShouldThrowExceptionWhenFileIsNull()
197182
{
198183
using (var image = new MagickImage())
199184
{
200-
Assert.Throws<ArgumentNullException>("fileName", () =>
201-
{
202-
image.Write((string)null, MagickFormat.Bmp);
203-
});
185+
Assert.Throws<ArgumentNullException>("fileName", () => image.Write((string)null, MagickFormat.Bmp));
204186
}
205187
}
206188

0 commit comments

Comments
 (0)