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

Commit

Permalink
Prepare for v0.6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DecaTec committed Jan 3, 2017
1 parent 8c94986 commit 3d37351
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnitTestLockToken.cs" />
<Compile Include="UnitTestProp.cs" />
<Compile Include="UnitTestTextHelper.cs" />
<Compile Include="UnitTestUriHelper.cs" />
<Compile Include="UnitTestWebDavClient.cs" />
<Compile Include="UnitTestWebDavHelper.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DecaTec.WebDav.NetFx.UnitTest
{
[TestClass]
public class UnitTestTextHelper
{
[TestMethod]
public void UT_NetFx_TextHelper_StringContainsRawUnicodeWithRawUnicode()
{
string strUni = "\u03a0";
var res = TextHelper.StringContainsRawUnicode(strUni);
Assert.AreEqual(true, res);
}

[TestMethod]
public void UT_NetFx_TextHelper_StringContainsRawUnicodeWithOutRawUnicode()
{
string strUni = "Test";
var res = TextHelper.StringContainsRawUnicode(strUni);
Assert.AreEqual(false, res);
}

[TestMethod]
public void UT_NetFx_TextHelper_StringContainsRawUnicodeWithEmptyString()
{
string strUni = string.Empty; ;
var res = TextHelper.StringContainsRawUnicode(strUni);
Assert.AreEqual(false, res);
}
}
}
2 changes: 1 addition & 1 deletion PortableWebDavLibrary.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>PortableWebDavLibrary</id>
<version>0.5.3.0</version>
<version>0.6.0.0</version>
<authors>DecaTec</authors>
<owners>DecaTec</owners>
<licenseUrl>https://github.com/DecaTec/Portable-WebDAV-Library/raw/master/LICENSE</licenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion Shared/DecaTec.WebDav.Shared/TextHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class TextHelper
/// Determines if a string contains raw Unicode.
/// </summary>
/// <param name="str">The string to check for raw Unicode characters.</param>
/// <returns>True if the string contains raw Unicode.</returns>
/// <returns>True if the string contains raw Unicode, otherwise false (also if the string specified is an empty string).</returns>
/// <remarks>If a string contains raw Unicode, this often indicates that there is a problem displaying the string in a readable notation (e.g. for non western characters).</remarks>
public static bool StringContainsRawUnicode(string str)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
</Compile>
<Compile Include="UnitTestLockToken.cs" />
<Compile Include="UnitTestProp.cs" />
<Compile Include="UnitTestTextHelper.cs" />
<Compile Include="UnitTestUriHelper.cs" />
<Compile Include="UnitTestWebDavClient.cs" />
<Compile Include="UnitTestWebDavHelper.cs" />
Expand Down
32 changes: 32 additions & 0 deletions Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/UnitTestTextHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;

namespace DecaTec.WebDav.Uwp.UnitTest
{
[TestClass]
public class UnitTestTextHelper
{
[TestMethod]
public void UT_UWP_TextHelper_StringContainsRawUnicodeWithRawUnicode()
{
string strUni = "\u03a0";
var res = TextHelper.StringContainsRawUnicode(strUni);
Assert.AreEqual(true, res);
}

[TestMethod]
public void UT_UWP_TextHelper_StringContainsRawUnicodeWithOutRawUnicode()
{
string strUni = "Test";
var res = TextHelper.StringContainsRawUnicode(strUni);
Assert.AreEqual(false, res);
}

[TestMethod]
public void UT_UWP_TextHelper_StringContainsRawUnicodeWithEmptyString()
{
string strUni = string.Empty; ;
var res = TextHelper.StringContainsRawUnicode(strUni);
Assert.AreEqual(false, res);
}
}
}

0 comments on commit 3d37351

Please sign in to comment.