Beispiel #1
0
        //"telefon" do przyjaciela, oparty na losowości
        private void phone(object sender, RoutedEventArgs e)
        {
            PH.Opacity   = 0.25;
            PH.IsEnabled = false;
            Random ph     = new Random();
            int    ph1    = ph.Next(1, 101);
            string tekst  = String.Empty;
            kola   phone1 = new kola();

            phone1.phone(QuestionNumber, fifty, ph1, out tekst);
            MessageBox.Show(tekst);
        }
Beispiel #2
0
        public void kolaTest()
        {
            int    n        = 8;
            int    odp1     = 4;
            int    fifty    = 0;
            int    ph1      = 47;
            string t        = string.Empty;
            string expected = ("Wydaje mi siê, ¿e jest to odpowiedŸ " + Questions.Quest[n, odp1]);
            kola   test     = new kola();

            test.phone(n, fifty, ph1, out t);
            Assert.AreEqual(expected, t);
        }