de.smartics.util.lang
Class StringFunctionChopTest

Package class diagram package StringFunctionChopTest
java.lang.Object
  extended by de.smartics.util.lang.StringFunctionChopTest

@Uut(type=de.smartics.util.lang.StringFunction.class,
     method="chop(StringBuilder)")
public class StringFunctionChopTest
     
     
extends Object

Tests StringFunction.chop(StringBuilder).


Constructor Summary
StringFunctionChopTest()
           
 
Method Summary
 void chopsCarrigeReturnNewLineAsOneCharacter()
           
 void chopsCarrigeReturnNewLineAsOneCharacterIfTheyAreTheOnlyChars()
           
 void chopsCarrigeReturnWithoutNewLineAsOneChar()
           
 void chopsTheLastCharacterIfNotEmpty()
           
 void chopsTheLastCharacterIfThereIsOne()
           
 void handlesASingleCarrigeReturnCorrectly()
           
 void handlesASingleNewlineCorrectly()
           
 void handlesLengthGreaterOneAndNewlineCorrectly()
           
 void returnsNullIfNullIsPassedAsArgument()
           
 void returnsTheEmptyStringIfTheEmptyStringIsPassedAsArgument()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringFunctionChopTest

public StringFunctionChopTest()
Method Detail

returnsNullIfNullIsPassedAsArgument

@TestDocHint(sentence="chop: null -> null",
             indexSortKey="001")
public void returnsNullIfNullIsPassedAsArgument()

returnsTheEmptyStringIfTheEmptyStringIsPassedAsArgument

@TestDocHint(sentence="chop: \"\" -> \"\"",
             indexSortKey="002")
public void returnsTheEmptyStringIfTheEmptyStringIsPassedAsArgument()

chopsTheLastCharacterIfThereIsOne

@TestDocHint(sentence="chop: \"x\" -> \"\"",
             indexSortKey="003")
public void chopsTheLastCharacterIfThereIsOne()

chopsTheLastCharacterIfNotEmpty

@TestDocHint(sentence="chop: \"abc\" -> \"ab\"",
             indexSortKey="004")
public void chopsTheLastCharacterIfNotEmpty()

chopsCarrigeReturnNewLineAsOneCharacter

@TestDocHint(sentence="chop: \"abc\\r\\n\" -> \"abc\"",
             indexSortKey="005")
public void chopsCarrigeReturnNewLineAsOneCharacter()

chopsCarrigeReturnWithoutNewLineAsOneChar

@TestDocHint(sentence="chop: \"\\r\" -> \"\"",
             indexSortKey="006")
public void chopsCarrigeReturnWithoutNewLineAsOneChar()

chopsCarrigeReturnNewLineAsOneCharacterIfTheyAreTheOnlyChars

@TestDocHint(sentence="chop: \"\\r\\n\" -> \"\"",
             indexSortKey="007")
public void chopsCarrigeReturnNewLineAsOneCharacterIfTheyAreTheOnlyChars()

handlesASingleNewlineCorrectly

@TestDocHint(sentence="chop: \"\\n\" -> \"\"",
             indexSortKey="008")
public void handlesASingleNewlineCorrectly()

handlesLengthGreaterOneAndNewlineCorrectly

@TestDocHint(sentence="chop: \"ab\\n\" -> \"ab\"",
             indexSortKey="009")
public void handlesLengthGreaterOneAndNewlineCorrectly()

handlesASingleCarrigeReturnCorrectly

@TestDocHint(sentence="chop: \"\\r\" -> \"\"",
             indexSortKey="010")
public void handlesASingleCarrigeReturnCorrectly()


Copyright © 2011-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.