public void ContentOfItems_5() { StringDivider sut = new StringDivider(); var result = sut.Divide("aabbccdef", 5); Assert.That(result[0], Is.EqualTo(new MaybeString("aabbccde"))); Assert.That(result[1], Is.EqualTo(new MaybeString("bbccdef"))); }
public void AndCardinalityIsGreaterThanCountOfDistinctLetters_ExceptionIsThrown() { Assert.Throws <ArgumentException>(() => { var sut = new StringDivider(); sut.Divide("aaaaabb", 3); }); }
public void ContentOfItems_3() { StringDivider sut = new StringDivider(); var result = sut.Divide("aab", 1); Assert.That(result[0], Is.EqualTo(new MaybeString("aa"))); Assert.That(result[1], Is.EqualTo(new MaybeString("b"))); }
public ExcelInternalAddress(string address) { Guard.ArgumentNotNullOrWhiteSpace(address, "address"); StringDivider addressDivider = new StringDivider(address, divider: "!"); this.SheetName = addressDivider.Left.TrimStartOnce("'").TrimEndOnce("'"); this.Cell = addressDivider.Right; }
public void Todo() { var mWordFactory = new Mock <IWordFactory>(); string inputWord = "aab"; mWordFactory.Setup(x => x.Create(inputWord)) .Returns(new Word(new MaybeString(inputWord))); var sut = new StringDivider(mWordFactory.Object, new WordSplitter()); var result = sut.Divide(inputWord, 2); }
public void ContentOfItems_4() { var sut = new StringDivider(); var result = sut.Divide("aabbccdef", 2); Assert.That(result[0], Is.EqualTo(new MaybeString("aabb"))); Assert.That(result[1], Is.EqualTo(new MaybeString("bbcc"))); Assert.That(result[2], Is.EqualTo(new MaybeString("ccd"))); Assert.That(result[3], Is.EqualTo(new MaybeString("de"))); Assert.That(result[4], Is.EqualTo(new MaybeString("ef"))); }
public void InitializeAncestor() { _ancestorDelimiter = "\u0001"; _ancestorData = Any.DelimitedString(_ancestorDelimiter); _ancestorDivider = new RootStringDivider(_ancestorData, _ancestorDelimiter[0]); }
public void CountOfItems_Test12() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("aabbccdef", 5).Count, Is.EqualTo(2)); }
public void CountOfItems_Test9() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("aabcdef", 2).Count, Is.EqualTo(5)); }
public void CountOfItems_Test7() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("abc", 3).Count, Is.EqualTo(1)); }
public void CountOfItems_Test4() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("ab", 1).Count, Is.EqualTo(2)); }
public void ContentOfItems_2() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("aa", 1)[0], Is.EqualTo(new MaybeString("aa"))); }
public void CountOfItems_Test16() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("aabbababaabbbab", 2).Count, Is.EqualTo(9)); }
public void CountOfItems_Test14() { StringDivider sut = new StringDivider(); Assert.That(sut.Divide("aabbaccd", 3).Count, Is.EqualTo(3)); }