コード例 #1
0
ファイル: Program.cs プロジェクト: Eslam-Ibrahim/-Challenges
        static void Main(string[] args)
        {
            string word;

            System.Console.WriteLine("Enter a word: ");
            word = System.Console.ReadLine();
            PalindromeGame pal = new PalindromeGame(word);

            Console.WriteLine($"Is Word Palindrome?: {pal.PlayPalindrome()}");
        }
コード例 #2
0
ファイル: PalindromeGame.cs プロジェクト: chokudai/TopCoder
 // END CUT HERE
 // BEGIN CUT HERE
 public static void Main()
 {
     try {
     PalindromeGame ___test = new PalindromeGame();
     ___test.run_test(-1);
     } catch(Exception e) {
     //Console.WriteLine(e.StackTrace);
     Console.WriteLine(e.ToString());
     }
 }
コード例 #3
0
ファイル: PalindromeGame.cs プロジェクト: chokudai/TopCoder
// END CUT HERE
// BEGIN CUT HERE
    public static void Main()
    {
        try {
            PalindromeGame ___test = new PalindromeGame();
            ___test.run_test(-1);
        } catch (Exception e) {
//Console.WriteLine(e.StackTrace);
            Console.WriteLine(e.ToString());
        }
    }
コード例 #4
0
        public void test1()
        {
            // Arrange --> Expected Value
            PalindromeGame pal1     = new PalindromeGame("noon");
            bool           expected = true;
            // Act --> Actual Value
            bool actual = pal1.PlayPalindrome();

            // Assert
            Assert.True(expected.Equals(actual));
        }
コード例 #5
0
        public void test3()
        {
            // Arrange --> Expected Value
            PalindromeGame pal3     = new PalindromeGame("cell");
            bool           expected = false;
            // Act --> Actual Value
            bool actual = pal3.PlayPalindrome();

            // Assert
            Assert.True(expected.Equals(actual));
        }