public void WithCopyConstructor_LeavesOriginalObjectUnchanged() { WordTents.Tent originalTent = new WordTents.Tent(); List <string> originalWords = new List <string>() { "abcd", "efgh", "IJKL", "MNOP" }; List <string> flippedWords = new List <string>() { "ijkl", "mnop", "ABCD", "EFGH" }; originalTent.WordsOnTent = originalWords; var flippedTent = new WordTents.Tent(originalTent); flippedTent.Flip(); Assert.AreEqual(originalWords, originalTent.WordsOnTent, "Expected original words to be unchanged"); Assert.AreEqual(flippedWords, flippedTent.WordsOnTent, "Expected flipped words."); }
public void SimpleExample_ReturnsExpectedResults() { WordTents.Tent tent = new WordTents.Tent(); Assert.AreEqual("abFd", tent.ReplaceLetterAtIndex("abcd", 2, 'F')); }