Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e8387b

Browse files
committed
Prove string concat behavior with a unit test
1 parent 3bf5053 commit 5e8387b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/ResXManager.Tests/UnitTest1.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,17 @@ public void ResourceTableEntryRuleStringFormatTest(string neutral, string[] spec
5252
Assert.Equal(expectedMessage, message);
5353
}
5454
}
55+
56+
[Fact]
57+
public void StringConcatBehavior()
58+
{
59+
const string? s1 = default;
60+
const string? s2 = default;
61+
const string s3 = "Test";
62+
63+
Assert.Equal(string.Empty, s1 + s2);
64+
Assert.Equal(s3, s1 + s3);
65+
Assert.Equal(s3, s1 + s3 + s2);
66+
}
5567
}
5668
}

0 commit comments

Comments
 (0)