public int GetCharsCount_ParametersAreValid_ReturnsResult(string str, char[] chars, int startIndex, int endIndex) { // Act return(CharsCounter.GetCharsCount(str, chars, startIndex, endIndex)); }
public void GetCharsCountStartIndexEndIndexLimit_StrParameterIsNull_ThrowsException() { // Act Assert.Throws <ArgumentNullException>(() => CharsCounter.GetCharsCount(null, null, 0, 0, 0)); }
public void GetCharsCountStartIndexEndIndex_EndIndexGreaterStringLength_ThrowsException() { // Act Assert.Throws <ArgumentOutOfRangeException>(() => CharsCounter.GetCharsCount(string.Empty, new char[] { 'a' }, 0, 1)); }
public void GetCharsCountStartIndexEndIndex_StartIndexGreaterEndIndex_ThrowsException() { // Act Assert.Throws <ArgumentOutOfRangeException>(() => CharsCounter.GetCharsCount("aa", new char[] { 'a' }, 1, 0)); }
public void GetCharsCountStartIndexEndIndex_StartIndexLessZero_ThrowsException() { // Act Assert.Throws <ArgumentOutOfRangeException>(() => CharsCounter.GetCharsCount(string.Empty, new char[] { 'a' }, -1, 0)); }
public void GetCharsCountStartIndexEndIndex_CharsParameterIsNull_ThrowsException() { // Act Assert.Throws <ArgumentNullException>(() => CharsCounter.GetCharsCount(string.Empty, null, 0, 0)); }
public int GetCharsCount_ParametersAreValid_ReturnsResult(string str, char[] chars) { // Act return(CharsCounter.GetCharsCount(str, chars)); }
public void GetCharsCountStartIndexEndIndexLimit_LimitLessZero_ThrowsException() { // Act Assert.Throws <ArgumentOutOfRangeException>(() => CharsCounter.GetCharsCount("aa", new char[] { 'a' }, 0, 1, -1)); }
public void GetCharsCount_StrParameterIsNull_ThrowsException() { // Act Assert.Throws <ArgumentNullException>(() => CharsCounter.GetCharsCount(null, null)); }