예제 #1
0
 public void Rename_NameIsSingleUnderscore_DoNotRename()
 {
     Assert.Equal("_", ParameterRenamer.Rename("_"));
 }
예제 #2
0
 public void Rename_NameContainerConsecutibeUnderscores_Throws()
 {
     Assert.Throws <InvalidOperationException>(() => ParameterRenamer.Rename("a__b"));
 }
예제 #3
0
 public void Rename_NameEndsWithUnderscore_Throws()
 {
     Assert.Throws <InvalidOperationException>(() => ParameterRenamer.Rename("a_"));
 }
예제 #4
0
 public void Rename_NameStartsWithUnderscore_Throws(string name)
 {
     Assert.Throws <InvalidOperationException>(() => ParameterRenamer.Rename(name));
 }
예제 #5
0
 public void Rename_NameIsNull_Throws()
 {
     Assert.Throws <ArgumentNullException>("name", () => ParameterRenamer.Rename(null));
 }
예제 #6
0
 public void Rename(string name, string expectedName)
 {
     Assert.Equal(expectedName, ParameterRenamer.Rename(name));
 }