public void LongLine_NotExist_Sym(string line, char sym) { // arrange var actual = 0; // act var expected = Parser.SymRepeats(line, sym); // assert Assert.Equal(expected, actual); }
public void SymRepeats_LongLine_GetCount(string line, char sym) { // arrange var actual = line.Where(l => l == sym).Count(); // act var expected = Parser.SymRepeats(line, sym); // assert Assert.Equal(expected, actual); }
public void NullLine_throwArgumentException() { // arrange string line = null; // act and assert Assert.Throws <ArgumentException>(() => { Parser.SymRepeats(line, default); }); }
public void EmptyLine_throwArgumentException() { // arrange string line = string.Empty; // act and assert Assert.Throws <ArgumentException>(() => { var result = Parser.SymRepeats(line, default); }); }
public void OneSymbolLine_s_lenght() { // arrange var line = "ssssssssss"; var sym = line[0]; int actual = line.Length; // act var expected = Parser.SymRepeats(line, sym); // assert Assert.Equal(expected, actual); }