From 3d37351a8453aaf3ffc92d2bf8cabe832ef447b7 Mon Sep 17 00:00:00 2001 From: DecaTec Date: Tue, 3 Jan 2017 05:07:33 +0100 Subject: [PATCH] Prepare for v0.6.0.0 --- .../DecaTec.WebDav.NetFx.UnitTest.csproj | 1 + .../UnitTestTextHelper.cs | 37 +++++++++++++++++++ PortableWebDavLibrary.nuspec | 2 +- Shared/DecaTec.WebDav.Shared/TextHelper.cs | 2 +- .../DecaTec.WebDav.Uwp.UnitTest.csproj | 1 + .../UnitTestTextHelper.cs | 32 ++++++++++++++++ 6 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/UnitTestTextHelper.cs create mode 100644 Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/UnitTestTextHelper.cs diff --git a/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/DecaTec.WebDav.NetFx.UnitTest.csproj b/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/DecaTec.WebDav.NetFx.UnitTest.csproj index 7c9c4ad..809dbdc 100644 --- a/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/DecaTec.WebDav.NetFx.UnitTest.csproj +++ b/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/DecaTec.WebDav.NetFx.UnitTest.csproj @@ -61,6 +61,7 @@ + diff --git a/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/UnitTestTextHelper.cs b/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/UnitTestTextHelper.cs new file mode 100644 index 0000000..7a4c83f --- /dev/null +++ b/NetFx/UnitTests/DecaTec.WebDav.NetFx.UnitTest/UnitTestTextHelper.cs @@ -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); + } + } +} diff --git a/PortableWebDavLibrary.nuspec b/PortableWebDavLibrary.nuspec index 12a817d..fa780f2 100644 --- a/PortableWebDavLibrary.nuspec +++ b/PortableWebDavLibrary.nuspec @@ -2,7 +2,7 @@ PortableWebDavLibrary - 0.5.3.0 + 0.6.0.0 DecaTec DecaTec https://github.com/DecaTec/Portable-WebDAV-Library/raw/master/LICENSE diff --git a/Shared/DecaTec.WebDav.Shared/TextHelper.cs b/Shared/DecaTec.WebDav.Shared/TextHelper.cs index d41e5d3..b6500d3 100644 --- a/Shared/DecaTec.WebDav.Shared/TextHelper.cs +++ b/Shared/DecaTec.WebDav.Shared/TextHelper.cs @@ -14,7 +14,7 @@ public static class TextHelper /// Determines if a string contains raw Unicode. /// /// The string to check for raw Unicode characters. - /// True if the string contains raw Unicode. + /// True if the string contains raw Unicode, otherwise false (also if the string specified is an empty string). /// 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). public static bool StringContainsRawUnicode(string str) { diff --git a/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/DecaTec.WebDav.Uwp.UnitTest.csproj b/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/DecaTec.WebDav.Uwp.UnitTest.csproj index db8c61f..d2a515c 100644 --- a/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/DecaTec.WebDav.Uwp.UnitTest.csproj +++ b/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/DecaTec.WebDav.Uwp.UnitTest.csproj @@ -101,6 +101,7 @@ + diff --git a/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/UnitTestTextHelper.cs b/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/UnitTestTextHelper.cs new file mode 100644 index 0000000..edabbb7 --- /dev/null +++ b/Uwp/UnitTests/DecaTec.WebDav.Uwp.UnitTest/UnitTestTextHelper.cs @@ -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); + } + } +}