Skip to content

Commit

Permalink
Taygun Savaş (#135)
Browse files Browse the repository at this point in the history
* Issue Number : #134

* Issue Number: #134 Fix

* Update ValidatorTestCategoryEnum.cs
  • Loading branch information
Demigodplayz authored Oct 29, 2021
1 parent e20e5ef commit c8876da
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WopiHost.Url.Tests/WopiUrlGeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void SettingsArePresent()
var hostSessionId = Guid.NewGuid().ToString();
var sessionContext = Guid.NewGuid().ToString();
var wopiSource = "c:\\doc.docx";
var validatorTestCategory = "All";
var validatorTestCategory = ValidatorTestCategoryEnum.All;

// Act
var settings = new WopiUrlSettings()
Expand Down
22 changes: 22 additions & 0 deletions WopiHost.Url/ValidatorTestCategoryEnum.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace WopiHost.Url
{
/// <summary>
/// This value is used to run the WOPI Validation application in different modes.
/// This value can be set to All, OfficeOnline or OfficeNativeClient to activate tests specific to Office Online and Office for iOS.If omitted, the default value is All.
/// </summary>
public enum ValidatorTestCategoryEnum
{
/// <summary>
/// All: activates all WOPI Validation application tests.
/// </summary>
All,
/// <summary>
/// OfficeOnline: activates all tests necessary for Office Online integration.
/// </summary>
OfficeOnline,
/// <summary>
/// OfficeNativeClient: activates all tests necessary for Office for iOS integration.
/// </summary>
OfficeNativeClient
}
}
4 changes: 2 additions & 2 deletions WopiHost.Url/WopiHost.Url.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\LICENSE.txt" Pack="true" PackagePath=""/>
<None Include="..\img\logo.png" Pack="true" PackagePath=""/>
<None Include="..\LICENSE.txt" Pack="true" PackagePath="" />
<None Include="..\img\logo.png" Pack="true" PackagePath="" />
</ItemGroup>

<PropertyGroup>
Expand Down
11 changes: 7 additions & 4 deletions WopiHost.Url/WopiUrlSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,20 @@ public string WopiSource
}

/// <summary>
/// TODO: convert to enum
/// This value is used to run the WOPI Validation application in different modes.
/// This value can be set to All, OfficeOnline or OfficeNativeClient to activate tests specific to Office Online and Office for iOS.If omitted, the default value is All.
/// All: activates all WOPI Validation application tests.
/// OfficeOnline: activates all tests necessary for Office Online integration.
/// OfficeNativeClient: activates all tests necessary for Office for iOS integration.
/// </summary>
public string ValidatorTestCategory
public ValidatorTestCategoryEnum ValidatorTestCategory
{
get => this["VALIDATOR_TEST_CATEGORY"];
set => this["VALIDATOR_TEST_CATEGORY"] = value;
get
{
Enum.TryParse(this["VALIDATOR_TEST_CATEGORY"], out ValidatorTestCategoryEnum validator);
return validator;
}
set => this["VALIDATOR_TEST_CATEGORY"] = value.ToString();
}

/// <summary>
Expand Down

0 comments on commit c8876da

Please sign in to comment.