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