Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Upgrade test framework versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate McMaster committed May 13, 2017
1 parent 25178a4 commit f46d8d2
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 47 deletions.
4 changes: 2 additions & 2 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AutoMapperVersion>5.2.0</AutoMapperVersion>
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
<TestSdkVersion>15.0.0</TestSdkVersion>
<XunitVersion>2.2.0</XunitVersion>
<TestSdkVersion>15.3.0-*</TestSdkVersion>
<XunitVersion>2.3.0-beta2-*</XunitVersion>
</PropertyGroup>
</Project>
4 changes: 0 additions & 4 deletions test/Entropy.FunctionalTests/Entropy.FunctionalTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>

This comment has been minimized.

Copy link
@mikeharder

mikeharder May 30, 2017

Contributor

Do you know why this was removed?

This comment has been minimized.

Copy link
@natemcmaster

natemcmaster May 30, 2017

Contributor

Intentional cleanup. VS doesn't actually need this in the csproj, and as of 15.3 preview (public), VS will no longer automatically re-add this to test projects. cref microsoft/vstest#472

<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<!--
Our functional tests utilize DependencyContext.Load which looks next to a dll for a deps.json. For each of our test
applications they need to have their corresponding deps.json placed next to their .dll in order to work.
Expand Down
78 changes: 39 additions & 39 deletions test/Entropy.FunctionalTests/MvcTests/InlineConstraintSampleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public async Task GetProductById_IntConstraintForOptionalId_IdPresent()
Assert.Equal(HttpStatusCode.OK, response.StatusCode);

var result = await GetResponseValues(response);
Assert.Equal(result["id"], "5");
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductById");
Assert.Equal("5", result["id"]);
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductById", result["action"]);
}

[Fact]
Expand All @@ -56,8 +56,8 @@ public async Task GetProductById_IntConstraintForOptionalId_NoId()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductById");
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductById", result["action"]);
}

[Fact]
Expand All @@ -79,9 +79,9 @@ public async Task GetProductByName_AlphaContraintForMandatoryName_ValidName()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["name"], "asdf");
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByName");
Assert.Equal("asdf", result["name"]);
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByName", result["action"]);
}

[Fact]
Expand Down Expand Up @@ -116,8 +116,8 @@ public async Task GetProductByManufacturingDate_DateTimeConstraintForMandatoryDa

var result = await GetResponseValues(response);
Assert.Equal(result["dateTime"], new DateTime(2014, 10, 11, 13, 45, 30));
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByManufacturingDate");
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByManufacturingDate", result["action"]);
}

[Fact]
Expand All @@ -129,9 +129,9 @@ public async Task GetProductByCategoryName_StringLengthConstraint_ForOptionalCat
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["name"], "Sports");
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByCategoryName");
Assert.Equal("Sports", result["name"]);
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByCategoryName", result["action"]);
}

[Fact]
Expand All @@ -154,8 +154,8 @@ public async Task GetProductByCategoryName_StringLength1To20Constraint_ForOption
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByCategoryName");
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByCategoryName", result["action"]);
}

[Fact]
Expand All @@ -167,9 +167,9 @@ public async Task GetProductByCategoryId_Int10To100Constraint_ForMandatoryCatId_
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["catId"], "40");
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByCategoryId");
Assert.Equal("40", result["catId"]);
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByCategoryId", result["action"]);
}

[Fact]
Expand Down Expand Up @@ -201,9 +201,9 @@ public async Task GetProductByPrice_FloatContraintForOptionalPrice_Valid()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["price"], "4023.23423");
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByPrice");
Assert.Equal("4023.23423", result["price"]);
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByPrice", result["action"]);
}

[Fact]
Expand All @@ -215,8 +215,8 @@ public async Task GetProductByPrice_FloatContraintForOptionalPrice_NoPrice()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByPrice");
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByPrice", result["action"]);
}

[Fact]
Expand All @@ -228,9 +228,9 @@ public async Task GetProductByManufacturerId_IntMin10Constraint_ForOptionalManuf
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["manId"], "57");
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByManufacturerId");
Assert.Equal("57", result["manId"]);
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByManufacturerId", result["action"]);
}

[Fact]
Expand All @@ -242,8 +242,8 @@ public async Task GetProductByManufacturerId_IntMin10Cinstraint_ForOptionalManuf
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetProductByManufacturerId");
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetProductByManufacturerId", result["action"]);
}

[Fact]
Expand All @@ -255,9 +255,9 @@ public async Task GetUserByName_RegExConstraint_ForMandatoryName_Valid()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["controller"], "Products");
Assert.Equal(result["action"], "GetUserByName");
Assert.Equal(result["name"], "abc");
Assert.Equal("Products", result["controller"]);
Assert.Equal("GetUserByName", result["action"]);
Assert.Equal("abc", result["name"]);
}

[Fact]
Expand All @@ -280,9 +280,9 @@ public async Task GetStoreById_GuidConstraintForOptionalId_Valid()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["id"], "691cf17a-791b-4af8-99fd-e739e168170f");
Assert.Equal(result["controller"], "Store");
Assert.Equal(result["action"], "GetStoreById");
Assert.Equal("691cf17a-791b-4af8-99fd-e739e168170f", result["id"]);
Assert.Equal("Store", result["controller"]);
Assert.Equal("GetStoreById", result["action"]);
}

[Fact]
Expand All @@ -294,8 +294,8 @@ public async Task GetStoreById_GuidConstraintForOptionalId_NoId()
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["controller"], "Store");
Assert.Equal(result["action"], "GetStoreById");
Assert.Equal("Store", result["controller"]);
Assert.Equal("GetStoreById", result["action"]);
}

[Fact]
Expand All @@ -317,9 +317,9 @@ public async Task GetStoreByLocation_StringLengthConstraint_AlphaConstraint_ForM
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await GetResponseValues(response);
Assert.Equal(result["location"], "Bellevue");
Assert.Equal(result["controller"], "Store");
Assert.Equal(result["action"], "GetStoreByLocation");
Assert.Equal("Bellevue", result["location"]);
Assert.Equal("Store", result["controller"]);
Assert.Equal("GetStoreByLocation", result["action"]);
}

[Fact]
Expand Down
5 changes: 3 additions & 2 deletions test/Entropy.FunctionalTests/MvcTests/JsonPatchSampleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ public static IEnumerable<object[]> InvalidJsonPatchData
}
}

[Theory, MemberData("InvalidJsonPatchData")]
[Theory]
[MemberData(nameof(InvalidJsonPatchData))]
public async Task JsonPatch_InvalidOperations_failure(string url, string input, string errorMessage)
{
// Arrange
Expand Down Expand Up @@ -324,4 +325,4 @@ public async Task JsonPatch_JsonConverterOnClass_Success()

}
}
}
}

0 comments on commit f46d8d2

Please sign in to comment.