public void CountToNumber_MultiplesOfFifteenPingPong_True() { List <string> expectedList = new List <string> { }; expectedList.Add("1"); expectedList.Add("2"); expectedList.Add("ping"); expectedList.Add("4"); expectedList.Add("pong"); expectedList.Add("ping"); expectedList.Add("7"); expectedList.Add("8"); expectedList.Add("ping"); expectedList.Add("pong"); expectedList.Add("11"); expectedList.Add("ping"); expectedList.Add("13"); expectedList.Add("14"); expectedList.Add("pingpong"); List <string> actualList = PingPong.CountToNumber(15); CollectionAssert.AreEqual(expectedList, actualList); }
public ActionResult DisplayResult() { PingPong newPingPong = new PingPong(); List <string> allNumbers = newPingPong.GetResult(int.Parse(Request.Form["inputNumber"])); return(View(allNumbers)); }
public void IsPingPong_NumberDivisibleBy3_True() { PingPong testPingPong = new PingPong(); Assert.AreEqual(true, testPingPong.IsPingPong(9)); Console.WriteLine("Ping-Pong"); }
public Form1() { InitializeComponent(); m_socket = new SocketIOSocket(); m_socket.Debug = Console.WriteLine; m_socket.Info = Console.WriteLine; m_socket.Warning = Console.WriteLine; m_socket.Error = Console.WriteLine; m_socket.On("open", Console.WriteLine); m_socket.On("message", Console.WriteLine); m_socket.On("close", Console.WriteLine); m_socket.On("error", Console.WriteLine); m_socket.Start(); m_ping = new PingPong(m_socket); m_timer = new Timer(); m_timer.Interval = 33; m_timer.Tick += (o, e) => { m_socket.Update(); }; m_timer.Start(); }
public void GetResult_NumberMultipleOfThree_ping() { PingPong testPingPong = new PingPong(); List <string> result = testPingPong.GetResult(3); Assert.AreEqual("ping", result[2]); }
public void GetResult_NumberMultipleOfFive_pong() { PingPong testPingPong = new PingPong(); List <string> result = testPingPong.GetResult(5); Assert.AreEqual("pong", result[4]); }
public void GetResult_NumberMultipleOfFifteen_pingpong() { PingPong testPingPong = new PingPong(); List <string> result = testPingPong.GetResult(15); Assert.AreEqual("PingPong", result[14]); }
public void GetResult_NumberNotAMultipleOfAbove_2() { PingPong testPingPong = new PingPong(); List <string> result = testPingPong.GetResult(2); Assert.AreEqual("2", result[1]); }
public ActionResult PingPongResults() { PingPong newPingPong = new PingPong(); int userInput = Int32.Parse(Request.Form["input-number"]); List <string> pingPongList = newPingPong.NumberCalc(userInput); return(View("PingPongResults", pingPongList)); }
public void GetPingPongGame_NumberDivisibleByThreeAndFive_True() { PingPong testPingPong = new PingPong(); string[] expectedResult = new string[] { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "ping-pong" }; string[] result = testPingPong.GetPingPongGame(15); CollectionAssert.AreEqual(expectedResult, result); }
public void ThisIsOurTest() { PingPong testPingPong = new PingPong(); List <string> testList = new List <string>(new string [] { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "ping pong" }); //List<int> list = new List<int>(new int[] { 2, 3, 7 }); CollectionAssert.AreEqual(testList, testPingPong.CreateList(15)); }
public void GetNumber_ReturnsNumbers_int() { PingPong testPingPong = new PingPong(1); int expected = 1; int test = testPingPong.GetNumber(); Assert.AreEqual(expected, test); }
public void IsPingPong_PrintPing_Ping() { List <string> expected = new List <string> { "1", "2", "ping" }; PingPong actual = new PingPong(); CollectionAssert.AreEqual(expected, actual.IsPingPong(3)); }
public void Play_ForNumberFifteen_ListOfOneToFourteenAndPingPong() { List <string> pingPong = PingPong.Play(15); List <string> expectedList = new List <string> { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "pingpong" }; Assert.Equal(expectedList, pingPong); }
private void CreateAppServiceButton_Click(object sender, RoutedEventArgs e) { var remoteSystem = SelectedSystem?.RemoteSystem; if (remoteSystem != null) { PingPong.CreateAppService(remoteSystem); } }
private static async Task OnEveryQueueTestPerform(PingPong pingPong) { foreach (var queue in PingPong.GetQueues().Select(o => o[0] as IMpScQueue <IWorkItem>)) { await pingPong.Test_Queue_Performance(queue); Console.WriteLine("============================================"); } }
public void Play_ForNumberTwo_ListOfOneAndTwo() { List <string> pingPong = PingPong.Play(2); List <string> expectedList = new List <string> { "1", "2" }; Assert.Equal(expectedList, pingPong); }
public void PrintUserInput_ShowsOutput_StringList() { PingPong testGame = new PingPong(); List <string> testList = new List <string> { "1", "2", "\"ping\"", "4", "\"pong\"" }; CollectionAssert.AreEqual(testList, testGame.PrintUserInput(5)); }
public void PingPongReplace_NumberListTo16() { PingPong testPingPong = new PingPong(); List <string> testList = new List <string> { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "ping-pong", "16" }; CollectionAssert.AreEqual(testList, testPingPong.PingPongReplace(16)); }
public void Translate_DivisibleByThreeAndFiveEquals_PingPong() { PingPong testBingBong = new PingPong(); testBingBong.Translate(15); List <string> myList = testBingBong.parsedList; Assert.AreEqual("ping-pong", myList[myList.Count - 1]); }
public void Translate_NotDivisibleByThreeOrFive_Self() { PingPong testBingBong = new PingPong(); testBingBong.Translate(4); List <string> myList = testBingBong.parsedList; Assert.AreEqual("4", myList[myList.Count - 1]); }
public void IsPingPong_PrintPingPong_PingPong() { List <string> expected = new List <string> { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "ping-pong" }; PingPong actual = new PingPong(); CollectionAssert.AreEqual(expected, actual.IsPingPong(15)); }
public void PopulateRangeList_IsListPopulated_ListContent() { PingPong testPingPong = new PingPong(); CollectionAssert.AreEqual(new List <int>() { 1, 2, 3 }, testPingPong.PopulateRangeList("3")); }
public void IsPingPong_PrintOne_1() { List <string> expected = new List <string> { "1" }; PingPong actual = new PingPong(); CollectionAssert.AreEqual(expected, actual.IsPingPong(1)); }
private static async Task DoPingPong(PingPong <PingRequest> .PingPongClient client, int requestNum, string payload, UInt16 delay) { var request = new PingRequest { Payload = payload, DelayMilliseconds = delay }; IMessage <PingResponse> response = await client.PingAsync(request); Console.WriteLine($"Request #{requestNum} response: \"{response.Payload.Deserialize().Payload}\". Delay: {delay}"); }
public void Play_ForNumberFive_ListOfOneTwoPingThreeFourPong() { List <string> pingPong = PingPong.Play(5); List <string> expectedList = new List <string> { "1", "2", "ping", "4", "pong" }; Assert.Equal(expectedList, pingPong); }
public void isPingPong_untilNumber_True() { PingPong testPingPong = new PingPong(); List <string> testList = new List <string> { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "ping-pong", "16" }; CollectionAssert.AreEqual(testList, PingPong.isPingPong(16)); }
public void TestNumberCalc() { PingPong newPingPong = new PingPong(); List <string> setValuesPingPongList = new List <string> { "1", "2", "Pong", "4", "Ping" }; CollectionAssert.AreEqual(setValuesPingPongList, newPingPong.NumberCalc(5)); }
public static void Main() { PingPong myPingPong = new PingPong(); Console.WriteLine("Enter a number!"); int startNumber = int.Parse(Console.ReadLine()); myPingPong.Translate(startNumber); }
public void Numbers_PingPongNumberLineGenerates_True() { PingPong testPingPong = new PingPong(); List <string> expectedResultList = new List <string> { "1", "2", "ping", "4", "pong", "ping", "7", "8", "ping", "pong", "11", "ping", "13", "14", "PiNg-PoNg", "16", "17", "ping", "19", "pong" }; var actualResult = testPingPong.NumberRange(20); CollectionAssert.AreEqual(expectedResultList, actualResult); }
private static void RunPingPong() { var scheduler = new Scheduler(); var ping = new PingPong("ping"); var pong = new PingPong("pong"); ping.Friend = pong; pong.Friend = ping; scheduler.Spawn(ping, pong); scheduler.Schedule(); }
public void RegisterDelegate(PingPong dlg) { this.ping = dlg; }
public override void OnRead(RiftClient From) { PingPong Pong = new PingPong(); Pong.Timestamp = (UInt32)Timestamp; From.SendSerialized(Pong); }