-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStringTransformTests.cs
32 lines (30 loc) · 968 Bytes
/
StringTransformTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MySQLCLRFunctions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MySQLCLRFunctions.Tests
{
[TestClass()]
public class StringTransformTests
{
[TestMethod()]
public void ReplaceMatchTest()
{
var input = "ThisIsIt";
var validoutput = "Th!s!s!t";
var output = StringTransform.ReplaceMatch(input, "[it]", "!");
Assert.AreEqual(expected: validoutput, output);
}
[TestMethod()]
public void ReplaceRecursiveTest()
{
var input = "This is a test of the emergency ";
var validoutput = "This is a test of the emergency ";
var output = StringTransform.ReplaceRecursive(input, " ", " ");
Assert.AreEqual(expected: validoutput, output);
}
}
}