Skip to content

Commit

Permalink
net9 (#168)
Browse files Browse the repository at this point in the history
* net9

* actions
petrsvihlik authored Nov 16, 2024
1 parent 743e119 commit b2564ac
Showing 20 changed files with 95 additions and 94 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore -s ${MYGET_FEED} -s https://api.nuget.org/v3/index.json
env:
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -19,14 +19,14 @@ jobs:
environment:
name: Integrate Pull Request
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore -s ${MYGET_FEED} -s https://api.nuget.org/v3/index.json
env:
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Extract version from tag
id: get_version
uses: battila7/get-version-action@v2
6 changes: 3 additions & 3 deletions src/WopiHost.Abstractions/WopiHost.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Abstractions Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost.Abstractions</AssemblyName>
<PackageId>WopiHost.Abstractions</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
@@ -37,9 +37,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="9.0.0" />
<PackageReference Include="System.Security.Claims" Version="4.3.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.3.1" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.2.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/WopiHost.Cobalt/CobaltHostLockingStore.cs
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ public override GetCoauthoringStatusRequest.OutputType HandleGetCoauthoringStatu
return result;
}

public override Dictionary<string, EditorsTableEntry> QueryEditorsTable() => new();
public override Dictionary<string, EditorsTableEntry> QueryEditorsTable() => [];

public override JoinEditingSessionRequest.OutputType HandleJoinEditingSession(JoinEditingSessionRequest.InputType input)
{
2 changes: 1 addition & 1 deletion src/WopiHost.Cobalt/WopiHost.Cobalt.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Cobalt Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost.Cobalt</AssemblyName>
<PackageId>WopiHost.Cobalt</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2 changes: 1 addition & 1 deletion src/WopiHost.Core/FileExtensions.cs
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ public static CheckFileInfo GetCheckFileInfo(this IWopiFile file, ClaimsPrincipa
checkFileInfo.UserId = principal.FindFirst(ClaimTypes.NameIdentifier)?.Value.ToSafeIdentity();
checkFileInfo.UserFriendlyName = principal.FindFirst(ClaimTypes.Name)?.Value;

var permissions = (WopiUserPermissions)Enum.Parse(typeof(WopiUserPermissions), principal.FindFirst(WopiClaimTypes.USER_PERMISSIONS).Value);
var permissions = Enum.Parse<WopiUserPermissions>(principal.FindFirst(WopiClaimTypes.USER_PERMISSIONS).Value);

checkFileInfo.ReadOnly = permissions.HasFlag(WopiUserPermissions.ReadOnly);
checkFileInfo.RestrictedWebViewOnly = permissions.HasFlag(WopiUserPermissions.RestrictedWebViewOnly);
6 changes: 3 additions & 3 deletions src/WopiHost.Core/WopiHost.Core.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Core Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost.Core</AssemblyName>
<PackageId>WopiHost.Core</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
@@ -42,7 +42,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion src/WopiHost.Discovery/WopiHost.Discovery.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Discovery Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost.Discovery</AssemblyName>
<PackageId>WopiHost.Discovery</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
@@ -41,5 +41,6 @@
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.FileSystemProvider Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost.FileSystemProvider</AssemblyName>
<PackageId>WopiHost.FileSystemProvider</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
@@ -33,17 +33,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Claims" Version="4.3.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.3.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.2.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
</ItemGroup>

<ItemGroup>
6 changes: 3 additions & 3 deletions src/WopiHost.FileSystemProvider/WopiSecurityHandler.cs
Original file line number Diff line number Diff line change
@@ -41,15 +41,15 @@ private SymmetricSecurityKey Key
{
"Anonymous",
new ClaimsPrincipal(
new ClaimsIdentity(new List<Claim>
{
new ClaimsIdentity(
[
new(ClaimTypes.NameIdentifier, "12345"),
new(ClaimTypes.Name, "Anonymous"),
new(ClaimTypes.Email, "anonymous@domain.tld"),

//TDOO: this needs to be done per file
new(WopiClaimTypes.USER_PERMISSIONS, (WopiUserPermissions.UserCanWrite | WopiUserPermissions.UserCanRename | WopiUserPermissions.UserCanAttend | WopiUserPermissions.UserCanPresent).ToString())
})
])
)
}
};
2 changes: 1 addition & 1 deletion src/WopiHost.Url/WopiHost.Url.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Url Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost.Url</AssemblyName>
<PackageId>WopiHost.Url</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
4 changes: 2 additions & 2 deletions src/WopiHost.Web/WopiHost.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>WopiHost.Web</AssemblyName>
@@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
28 changes: 14 additions & 14 deletions src/WopiHost/WopiHost.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>WopiHost</AssemblyName>
<OutputType>Exe</OutputType>
<PublishReadyToRun>true</PublishReadyToRun>
@@ -23,19 +23,19 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="8.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Autofac" Version="8.1.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions test/WopiHost.Core.Tests/WopiHost.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.Core\WopiHost.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="coverlet.collector" Version="6.0.1">
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="coverlet.msbuild" Version="6.0.1">
<PackageReference Update="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FakeItEasy" Version="8.1.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.console" Version="2.7.0">
<PackageReference Update="FakeItEasy" Version="8.3.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.console" Version="2.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
26 changes: 13 additions & 13 deletions test/WopiHost.Discovery.Tests/WopiDiscovererTests.cs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
private const string XmlOo2019 = "OO2019_discovery.xml";
private const string XmlInvalid = "INVALID_discovery.xml";

public WopiDiscovererTests()

Check warning on line 14 in test/WopiHost.Discovery.Tests/WopiDiscovererTests.cs

GitHub Actions / build

Non-nullable field '_wopiDiscoverer' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 14 in test/WopiHost.Discovery.Tests/WopiDiscovererTests.cs

GitHub Actions / build

Non-nullable field '_wopiDiscoverer' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
}

@@ -22,7 +22,7 @@
[InlineData(NetZoneEnum.InternalHttp, "xlsx", WopiActionEnum.MobileView, "http://owaserver/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&><dchat=DISABLE_CHAT&>", XmlOo2019)]
[InlineData(NetZoneEnum.ExternalHttps, "xlsx", WopiActionEnum.MobileView, "https://excel.officeapps.live.com/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&><dchat=DISABLE_CHAT&><hid=HOST_SESSION_ID&><sc=SESSION_CONTEXT&><wopisrc=WOPI_SOURCE&>", XmlOo2019)]
[InlineData(NetZoneEnum.InternalHttp, "ods", WopiActionEnum.Edit, "http://owaserver/x/_layouts/xlviewerinternal.aspx?edit=1&<ui=UI_LLCC&><rs=DC_LLCC&>", XmlOwa2013)]
public async void NetZoneTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string expectedValue, string fileName)
public async Task NetZoneTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string expectedValue, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -35,7 +35,7 @@
}

[Fact]
public async void InvalidNetZone()
public async Task InvalidNetZone()
{
// Arrange
InitDiscoverer(XmlInvalid, NetZoneEnum.InternalHttp);
@@ -50,7 +50,7 @@
[Theory]
[InlineData(NetZoneEnum.InternalHttp, "xlsx", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "docx", XmlOos2016)]
public async void SupportedExtension(NetZoneEnum netZone, string extension, string fileName)
public async Task SupportedExtension(NetZoneEnum netZone, string extension, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -65,7 +65,7 @@
[Theory]
[InlineData(NetZoneEnum.InternalHttp, "html", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "txt", XmlOos2016)]
public async void NonSupportedExtension(NetZoneEnum netZone, string extension, string fileName)
public async Task NonSupportedExtension(NetZoneEnum netZone, string extension, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -80,7 +80,7 @@
[Theory]
[InlineData(NetZoneEnum.InternalHttp, "html", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "txt", XmlOos2016)]
public async void NonSupportedExtensionWithAction(NetZoneEnum netZone, string extension, string fileName)
public async Task NonSupportedExtensionWithAction(NetZoneEnum netZone, string extension, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -95,7 +95,7 @@
[Theory]
[InlineData(NetZoneEnum.InternalHttp, "pptx", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "docx", XmlOos2016)]
public async void SupportedExtensionWithAction(NetZoneEnum netZone, string extension, string fileName)
public async Task SupportedExtensionWithAction(NetZoneEnum netZone, string extension, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -110,7 +110,7 @@
[Theory]
[InlineData(NetZoneEnum.InternalHttp, "html", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "txt", XmlOos2016)]
public async void NonSupportedExtensionCobalt(NetZoneEnum netZone, string extension, string fileName)
public async Task NonSupportedExtensionCobalt(NetZoneEnum netZone, string extension, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -125,7 +125,7 @@
[Theory]
[InlineData(NetZoneEnum.InternalHttp, "docx", XmlOwa2013, true)]
[InlineData(NetZoneEnum.InternalHttp, "docx", XmlOos2016, false)]
public async void SupportedExtensionCobalt(NetZoneEnum netZone, string extension, string fileName, bool expected)
public async Task SupportedExtensionCobalt(NetZoneEnum netZone, string extension, string fileName, bool expected)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -142,7 +142,7 @@
[InlineData(NetZoneEnum.InternalHttp, "docx", WopiActionEnum.Edit, "http://owaserver/we/wordeditorframe.aspx?<ui=UI_LLCC&><rs=DC_LLCC&><showpagestats=PERFSTATS&>", XmlOwa2013)]
[InlineData(NetZoneEnum.InternalHttp, "html", WopiActionEnum.Edit, null, XmlOwa2013)]
[InlineData(NetZoneEnum.InternalHttp, "txt", WopiActionEnum.Edit, null, XmlOwa2013)]
public async void UrlTemplateTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string? expectedValue, string fileName)
public async Task UrlTemplateTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string? expectedValue, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -159,7 +159,7 @@
[InlineData(NetZoneEnum.InternalHttp, "docx", "Word", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "html", null, XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "txt", null, XmlOos2016)]
public async void AppNameTests(NetZoneEnum netZone, string extension, string? expectedValue, string fileName)
public async Task AppNameTests(NetZoneEnum netZone, string extension, string? expectedValue, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -176,7 +176,7 @@
[InlineData(NetZoneEnum.InternalHttp, "docx", "http://owaserver/wv/resources/1033/FavIcon_Word.ico", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "html", null, XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "txt", null, XmlOos2016)]
public async void FavIconTests(NetZoneEnum netZone, string extension, string? expectedValue, string fileName)
public async Task FavIconTests(NetZoneEnum netZone, string extension, string? expectedValue, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -194,7 +194,7 @@
[InlineData(NetZoneEnum.InternalHttp, "docx", WopiActionEnum.Edit, "cobalt", XmlOwa2013)]
[InlineData(NetZoneEnum.InternalHttp, "docx", WopiActionEnum.Edit, "update", XmlOos2016)]
[InlineData(NetZoneEnum.InternalHttp, "one", WopiActionEnum.View, "containers", XmlOwa2013)]
public async void ActionRequirementsTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string expectedValue, string fileName)
public async Task ActionRequirementsTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string expectedValue, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
@@ -211,7 +211,7 @@
[InlineData(NetZoneEnum.InternalHttp, "one", WopiActionEnum.Edit, "locks", XmlOwa2013)]
[InlineData(NetZoneEnum.InternalHttp, "xlsx", WopiActionEnum.Edit, "locks", XmlOwa2013)]
[InlineData(NetZoneEnum.InternalHttp, "xlsx", WopiActionEnum.Edit, "cobalt", XmlOos2016)]
public async void ActionRequirementsNegativeTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string expectedValue, string fileName)
public async Task ActionRequirementsNegativeTests(NetZoneEnum netZone, string extension, WopiActionEnum action, string expectedValue, string fileName)
{
// Arrange
InitDiscoverer(fileName, netZone);
16 changes: 8 additions & 8 deletions test/WopiHost.Discovery.Tests/WopiHost.Discovery.Tests.csproj
Original file line number Diff line number Diff line change
@@ -6,30 +6,30 @@
</ItemGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.Discovery\WopiHost.Discovery.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="coverlet.collector" Version="6.0.1">
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="coverlet.msbuild" Version="6.0.1">
<PackageReference Update="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FakeItEasy" Version="8.1.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.console" Version="2.7.0">
<PackageReference Update="FakeItEasy" Version="8.3.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.console" Version="2.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.FileSystemProvider\WopiHost.FileSystemProvider.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="coverlet.collector" Version="6.0.1">
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="coverlet.msbuild" Version="6.0.1">
<PackageReference Update="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FakeItEasy" Version="8.1.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.console" Version="2.7.0">
<PackageReference Update="FakeItEasy" Version="8.3.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.console" Version="2.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
16 changes: 8 additions & 8 deletions test/WopiHost.Url.Tests/WopiHost.Url.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.Url\WopiHost.Url.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="coverlet.collector" Version="6.0.1">
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="coverlet.msbuild" Version="6.0.1">
<PackageReference Update="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FakeItEasy" Version="8.1.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.console" Version="2.7.0">
<PackageReference Update="FakeItEasy" Version="8.3.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.console" Version="2.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
6 changes: 3 additions & 3 deletions test/WopiHost.Url.Tests/WopiUrlGeneratorTests.cs
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ public WopiUrlGeneratorTests()
[Theory]
[InlineData("xlsx", "http://wopihost:5000/wopi/files/test.xlsx", WopiActionEnum.Edit, "http://owaserver/x/_layouts/xlviewerinternal.aspx?edit=1&WOPISrc=http%3A%2F%2Fwopihost%3A5000%2Fwopi%2Ffiles%2Ftest.xlsx")]
[InlineData("docx", "http://wopihost:5000/wopi/files/test.docx", WopiActionEnum.View, "http://owaserver/wv/wordviewerframe.aspx?&WOPISrc=http%3A%2F%2Fwopihost%3A5000%2Fwopi%2Ffiles%2Ftest.docx")]
public async void UrlWithoutAdditionalSettings(string extension, string wopiFileUrl, WopiActionEnum action, string expectedValue)
public async Task UrlWithoutAdditionalSettings(string extension, string wopiFileUrl, WopiActionEnum action, string expectedValue)
{
// Arrange
var urlGenerator = new WopiUrlBuilder(_discoverer);
@@ -34,7 +34,7 @@ public async void UrlWithoutAdditionalSettings(string extension, string wopiFile
[Theory]
[InlineData("xlsx", "http://wopihost:5000/wopi/files/test.xlsx", WopiActionEnum.Edit, "http://owaserver/x/_layouts/xlviewerinternal.aspx?edit=1&ui=en-US&WOPISrc=http%3A%2F%2Fwopihost%3A5000%2Fwopi%2Ffiles%2Ftest.xlsx")]
[InlineData("docx", "http://wopihost:5000/wopi/files/test.docx", WopiActionEnum.View, "http://owaserver/wv/wordviewerframe.aspx?ui=en-US&WOPISrc=http%3A%2F%2Fwopihost%3A5000%2Fwopi%2Ffiles%2Ftest.docx")]
public async void UrlWithAdditionalSettings(string extension, string wopiFileUrl, WopiActionEnum action, string expectedValue)
public async Task UrlWithAdditionalSettings(string extension, string wopiFileUrl, WopiActionEnum action, string expectedValue)
{
// Arrange
var settings = new WopiUrlSettings { UiLlcc = new CultureInfo("en-US") };
@@ -49,7 +49,7 @@ public async void UrlWithAdditionalSettings(string extension, string wopiFileUrl

[Theory]
[InlineData("html", "http://wopihost:5000/wopi/files/test.xlsx", WopiActionEnum.Edit, null)]
public async void NonExistentTemplate(string extension, string wopiFileUrl, WopiActionEnum action, string? expectedValue)
public async Task NonExistentTemplate(string extension, string wopiFileUrl, WopiActionEnum action, string? expectedValue)
{
// Arrange
var urlGenerator = new WopiUrlBuilder(_discoverer);

0 comments on commit b2564ac

Please sign in to comment.