Skip to content

Commit 752de0b

Browse files
committed
Refactor tests and update using directives
Updated `using` directives in `FieldCalculationMapTests.cs` to include additional namespaces and consolidate them into a single line. Replaced `Assert.ThrowsException` with `Assert.Throws` in two test methods for improved consistency and readability. Performed minor formatting adjustments, including closing brace cleanup.
1 parent 715aa6b commit 752de0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/MigrationTools.Tests/Tools/FieldMaps/FieldCalculationMapTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
44
using MigrationTools.Tools;
@@ -117,7 +117,7 @@ public void NCalcExpression_InvalidExpression_ShouldThrowException()
117117
var expression = new Expression("[x] + ["); // Invalid syntax
118118

119119
// Act & Assert - NCalc throws EvaluationException for invalid syntax
120-
Assert.ThrowsException<NCalc.EvaluationException>(() => expression.Evaluate());
120+
Assert.Throws<NCalc.EvaluationException>(() => expression.Evaluate());
121121
}
122122

123123
[TestMethod]
@@ -127,7 +127,7 @@ public void NCalcExpression_UndefinedVariable_ShouldThrowException()
127127
var expression = new Expression("[undefined] * 2");
128128

129129
// Act & Assert
130-
Assert.ThrowsException<ArgumentException>(() => expression.Evaluate());
130+
Assert.Throws<ArgumentException>(() => expression.Evaluate());
131131
}
132132
}
133-
}
133+
}

0 commit comments

Comments
 (0)