/src/BurnSystems/tests/BurnSystems.UnitTests/StringManipulationTests.cs
https://bitbucket.org/mbrenn/entityconnector · C# · 35 lines · 25 code · 4 blank · 6 comment · 0 complexity · d4bda2792506ddaa7a3ae45ab7a3d46e MD5 · raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using NUnit.Framework;
-
- namespace BurnSystems.UnitTests
- {
- /// <summary>
- /// Contains the test concerning string manipulation
- /// </summary>
- [TestFixture]
- public class StringManipulationTests
- {
- /// <summary>
- /// Checks, if AddSlashes works as intended
- /// </summary>
- [Test]
- public void TestAddSlashes()
- {
- var testString = "c:\\Test";
- var result = StringManipulation.AddSlashes(testString);
-
- Assert.That(result, Is.EqualTo("c:\\\\Test"));
-
- testString = "c:/Test";
- result = StringManipulation.AddSlashes(testString);
- Assert.That(result, Is.EqualTo("c:/Test"));
-
- testString = "c:\\\\\\\\Test";
- result = StringManipulation.AddSlashes(testString);
- Assert.That(result, Is.EqualTo("c:\\\\\\\\\\\\\\\\Test"));
- }
- }
- }