Skip to content

Commit b38ed62

Browse files
committed
Added extra tests.
1 parent f8295b3 commit b38ed62

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
2+
//
3+
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
4+
// compliance with the License. You may obtain a copy of the License at
5+
//
6+
// https://www.imagemagick.org/script/license.php
7+
//
8+
// Unless required by applicable law or agreed to in writing, software distributed under the
9+
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10+
// either express or implied. See the License for the specific language governing permissions
11+
// and limitations under the License.
12+
13+
using System;
14+
using ImageMagick;
15+
using Xunit;
16+
17+
namespace Magick.NET.Tests
18+
{
19+
public partial class MagickNETTests
20+
{
21+
public class TheSetFontConfigDirectoryMethod
22+
{
23+
[Fact]
24+
public void ShouldThrowExceptionWhenPathIsNull()
25+
{
26+
Assert.Throws<ArgumentNullException>("path", () =>
27+
{
28+
MagickNET.SetFontConfigDirectory(null);
29+
});
30+
}
31+
32+
[Fact]
33+
public void ShouldThrowExceptionWhenPathIsInvalid()
34+
{
35+
Assert.Throws<ArgumentException>("path", () =>
36+
{
37+
MagickNET.SetFontConfigDirectory("Invalid");
38+
});
39+
}
40+
}
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
2+
//
3+
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
4+
// compliance with the License. You may obtain a copy of the License at
5+
//
6+
// https://www.imagemagick.org/script/license.php
7+
//
8+
// Unless required by applicable law or agreed to in writing, software distributed under the
9+
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10+
// either express or implied. See the License for the specific language governing permissions
11+
// and limitations under the License.
12+
13+
using System;
14+
using ImageMagick;
15+
using Xunit;
16+
17+
namespace Magick.NET.Tests
18+
{
19+
public partial class MagickNETTests
20+
{
21+
public class TheSetGhostscriptDirectoryMethod
22+
{
23+
[Fact]
24+
public void ShouldThrowExceptionWhenPathIsNull()
25+
{
26+
Assert.Throws<ArgumentNullException>("path", () =>
27+
{
28+
MagickNET.SetGhostscriptDirectory(null);
29+
});
30+
}
31+
32+
[Fact]
33+
public void ShouldThrowExceptionWhenPathIsInvalid()
34+
{
35+
Assert.Throws<ArgumentException>("path", () =>
36+
{
37+
MagickNET.SetGhostscriptDirectory("Invalid");
38+
});
39+
}
40+
}
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
2+
//
3+
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
4+
// compliance with the License. You may obtain a copy of the License at
5+
//
6+
// https://www.imagemagick.org/script/license.php
7+
//
8+
// Unless required by applicable law or agreed to in writing, software distributed under the
9+
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10+
// either express or implied. See the License for the specific language governing permissions
11+
// and limitations under the License.
12+
13+
using System;
14+
using ImageMagick;
15+
using Xunit;
16+
17+
namespace Magick.NET.Tests
18+
{
19+
public partial class MagickNETTests
20+
{
21+
public class TheSetGhostscriptFontDirectoryMethod
22+
{
23+
[Fact]
24+
public void ShouldThrowExceptionWhenPathIsNull()
25+
{
26+
Assert.Throws<ArgumentNullException>("path", () =>
27+
{
28+
MagickNET.SetGhostscriptFontDirectory(null);
29+
});
30+
}
31+
32+
[Fact]
33+
public void ShouldThrowExceptionWhenPathIsInvalid()
34+
{
35+
Assert.Throws<ArgumentException>("path", () =>
36+
{
37+
MagickNET.SetGhostscriptFontDirectory("Invalid");
38+
});
39+
}
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)