コード例 #1
0
 public int GetIndexOfChar_NonEmptyString_ReturnsPosition2(string str, char value, int startIndex, int count)
 {
     // Act
     return(DoWhileMethods.GetIndexOfChar(str, value, startIndex, count));
 }
コード例 #2
0
 public void GetIndexOfCharStartIndexCount_CountLessZero_ThrowsException()
 {
     // Act
     Assert.Throws <ArgumentOutOfRangeException>(() => DoWhileMethods.GetIndexOfChar(string.Empty, 'a', 0, -1));
 }
コード例 #3
0
 public void GetIndexOfCharStartIndexCount_NullString_ThrowsException()
 {
     // Act
     Assert.Throws <ArgumentNullException>(() => DoWhileMethods.GetIndexOfChar(null, 'a', 0, 0));
 }
コード例 #4
0
 public void GetIndexOfCharStartIndexCount_StartIndexGreaterStringLength_ThrowsException()
 {
     // Act
     Assert.Throws <ArgumentOutOfRangeException>(() => DoWhileMethods.GetIndexOfChar(string.Empty, 'a', 1, 0));
 }
コード例 #5
0
 public int GetIndexOfChar_NonEmptyString_ReturnsPosition(string str, char value)
 {
     // Act
     return(DoWhileMethods.GetIndexOfChar(str, value));
 }