Skip to content

Commit d8cf043

Browse files
author
Konstantin
committed
fix build error
1 parent a05551b commit d8cf043

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

BO4ETestProject/TestZeitfenster.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using AwesomeAssertions;
23
using BO4E.COM;
34
using Microsoft.VisualStudio.TestTools.UnitTesting;
45

@@ -22,30 +23,30 @@ public void TestZeitfensterCreationFromValidString()
2223
/// Invalid string length
2324
/// </summary>
2425
[TestMethod]
25-
[ExpectedException(typeof(ArgumentException))]
2626
public void TestZeitfensterCreationFromInvalidString_Length()
2727
{
28-
var zeitfenster = new Zeitfenster("090017");
28+
var instantiating = () => new Zeitfenster("090017");
29+
instantiating.Should().Throw<ArgumentException>();
2930
}
3031

3132
/// <summary>
3233
/// Invalid format (non-numeric)
3334
/// </summary>
3435
[TestMethod]
35-
[ExpectedException(typeof(ArgumentException))]
3636
public void TestZeitfensterCreationFromInvalidString_Format()
3737
{
38-
var zeitfenster = new Zeitfenster("09XX1700");
38+
var instantiating = () => new Zeitfenster("09XX1700");
39+
instantiating.Should().Throw<ArgumentException>();
3940
}
4041

4142
/// <summary>
4243
/// Invalid time (hours >= 24 or minutes >= 60)
4344
/// </summary>
4445
[TestMethod]
45-
[ExpectedException(typeof(ArgumentException))]
4646
public void TestZeitfensterCreationFromInvalidString_InvalidTime()
4747
{
48-
var zeitfenster = new Zeitfenster("24611700");
48+
var instantiating = () => new Zeitfenster("24611700");
49+
instantiating.Should().Throw<ArgumentException>();
4950
}
5051

5152
/// <summary>

0 commit comments

Comments
 (0)