-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStringReplaceConverterTests.cs
39 lines (31 loc) · 1.35 KB
/
StringReplaceConverterTests.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
33
34
35
36
37
38
39
using NUnit.Framework;
using Shouldly;
namespace CodingSeb.Converters.Tests
{
[TestFixture]
internal class StringReplaceConverterTests
{
[Category("Convert")]
[Test]
public void StringReplaceConvert()
{
StringReplaceConverter converter = new StringReplaceConverter();
converter.Convert("23 asl Hello World 29", null, null, null).ShouldBe("23 asl Hello World 29");
converter.OldString = "Hello";
converter.Convert("23 asl Hello World 29", null, null, null).ShouldBe("23 asl World 29");
converter.NewString = "Test";
converter.Convert("23 asl Hello World 29", null, null, null).ShouldBe("23 asl Test World 29");
}
[Category("ConvertBack")]
[Test]
public void StringReplaceConvertBackReturnStringAsThis()
{
StringReplaceConverter converter = new StringReplaceConverter();
converter.ConvertBack("23 asl Test World 29", null, null, null).ShouldBe("23 asl Test World 29");
converter.NewString = "Test";
converter.ConvertBack("23 asl Test World 29", null, null, null).ShouldBe("23 asl World 29");
converter.OldString = "Hello";
converter.ConvertBack("23 asl Test World 29", null, null, null).ShouldBe("23 asl Hello World 29");
}
}
}