public void ToStringShouldStartWithACapitalLetter() { var sentence = new Sentence( new Word("fi"), new Word("fo"), new Word("fum")); Assert.Equal('F', sentence.ToString()[0]); }
public void GetHashCodeShouldMatchForSameObject() { var s1 = new Sentence( new Word("fi"), new Word("fo"), new Word("fun")); var s2 = new Sentence( new Word("fi"), new Word("fo"), new Word("fun")); Assert.Equal(s1.GetHashCode(), s2.GetHashCode()); }
public void EqualsShouldWord() { var s1 = new Sentence( new Word("fi"), new Word("fo"), new Word("fun")); var s2 = new Sentence( new Word("fi"), new Word("fo"), new Word("fun")); Assert.Equal(s1, s2); }
public void ToStringShouldSpaceWordsWithSpaces() { var sentence = new Sentence(new Word("foo"), new Word("bar")); Assert.Equal("Foo bar.", sentence.ToString()); }
public void ToStringShouldEndWithPeriod() { var sentence = new Sentence(new Word("foo"), new Word("bar")); Assert.Equal('.', sentence.ToString().Last()); }