public void ReversedString(string myWord, string expected) { // Arrange var myTest = new MyExtraMethods(); // Act string actual = myTest.ReversedString(myWord); // Assert Assert.Equal(expected, actual); }
public void TestIfPrime(int num, bool expected) { // Arrange var myTest = new MyExtraMethods(); // Act bool actual = myTest.IsPrime(num); // Assert Assert.Equal(expected, actual); }
public void FindOddInt(int[] nums, int expected) { // Arrange var myTest = new MyExtraMethods(); // Act int actual = myTest.FindOddInt(nums); // Assert Assert.Equal(expected, actual); }
public void LongestConsecTest(string[] strArray, int num, string expected) { // Arrange var myTest = new MyExtraMethods(); // Act string actual = myTest.LongestConsec(strArray, num); // Assert Assert.Equal(expected, actual); }
public void WesternStyleEmoticon() { // Arrange var myTest = new MyExtraMethods(); string[] emotArray = { ":-)", ":-(", ":/", ";)", ":o", ":|", "=)", "<3" }; // Check all strings foreach (string emoticon in emotArray) { // Act bool actual = myTest.WesternStyleEmoticon(emoticon); // Assert Assert.True(actual); } }