Skip to content

Commit 6341fdb

Browse files
committed
swap the test cases between query and path expression
1 parent 319fd9d commit 6341fdb

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

test/Microsoft.OpenApi.Tests/Expressions/PathExpressionTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@
88
namespace Microsoft.OpenApi.Tests.Writers
99
{
1010
[Collection("DefaultSettings")]
11-
public class QueryExpressionTests
11+
public class PathExpressionTests
1212
{
1313
[Theory]
1414
[InlineData(null)]
1515
[InlineData("")]
1616
[InlineData(" ")]
17-
public void QueryExpressionConstructorThrows(string name)
17+
public void PathExpressionConstructorThrows(string name)
1818
{
1919
// Arrange
20-
Action test = () => new QueryExpression(name);
20+
Action test = () => new PathExpression(name);
2121

2222
// Act
2323
Assert.Throws<ArgumentException>("name", test);
2424
}
2525

2626
[Fact]
27-
public void QueryExpressionConstructorWorks()
27+
public void PathExpressionConstructorWorks()
2828
{
2929
// Arrange
3030
string name = "anyValue";
3131

3232
// Act
33-
var query = new QueryExpression(name);
33+
var path = new PathExpression(name);
3434

3535
// Assert
36-
Assert.Equal("query.anyValue", query.Expression);
37-
Assert.Equal("anyValue", query.Name);
36+
Assert.Equal("path.anyValue", path.Expression);
37+
Assert.Equal("anyValue", path.Name);
3838
}
3939
}
4040
}

test/Microsoft.OpenApi.Tests/Expressions/QueryExpressionTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@
88
namespace Microsoft.OpenApi.Tests.Writers
99
{
1010
[Collection("DefaultSettings")]
11-
public class PathExpressionTests
11+
public class QueryExpressionTests
1212
{
1313
[Theory]
1414
[InlineData(null)]
1515
[InlineData("")]
1616
[InlineData(" ")]
17-
public void PathExpressionConstructorThrows(string name)
17+
public void QueryExpressionConstructorThrows(string name)
1818
{
1919
// Arrange
20-
Action test = () => new PathExpression(name);
20+
Action test = () => new QueryExpression(name);
2121

2222
// Act
2323
Assert.Throws<ArgumentException>("name", test);
2424
}
2525

2626
[Fact]
27-
public void PathExpressionConstructorWorks()
27+
public void QueryExpressionConstructorWorks()
2828
{
2929
// Arrange
3030
string name = "anyValue";
3131

3232
// Act
33-
var path = new PathExpression(name);
33+
var query = new QueryExpression(name);
3434

3535
// Assert
36-
Assert.Equal("path.anyValue", path.Expression);
37-
Assert.Equal("anyValue", path.Name);
36+
Assert.Equal("query.anyValue", query.Expression);
37+
Assert.Equal("anyValue", query.Name);
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)