public void TestEXESigWrong() { #if DEBUG string Filename = Environment.ExpandEnvironmentVariables("%TEMP%\\Vulpes Clock Wrong.exe"); File.WriteAllBytes(Filename, Resources.CLOCK___Wrong); ProgramAgent.Init(); if (ProgramAgent.LoadDLLForced(SystemInfos.CPUType.EM64T) == false) { Assert.Inconclusive("Cannot load Agent supplemental DLL"); } Assert.AreEqual(false, ProgramAgent.CPP.VerifyEXESignature(Filename)); #else Assert.AreEqual(true, true); #endif }
public void TestGetDeltaStream_WebsocketWrite() { #if DEBUG if (Directory.Exists(PipeScreenData.Framebufferpath) == false) { Assert.Inconclusive("Cannot find " + PipeScreenData.Framebufferpath); return; } List <string> FileList = Directory.EnumerateFiles(PipeScreenData.Framebufferpath, "*.png", SearchOption.TopDirectoryOnly).ToList(); if (FileList == null || FileList.Count == 0) { Assert.Inconclusive("No PNG files in " + PipeScreenData.Framebufferpath); return; } ProgramAgent.Init(); if (ProgramAgent.LoadDLLForced(SystemInfos.CPUType.EM64T) == false) { Assert.Inconclusive("Cannot load Agent supplemental DLL"); } ScreenDataWS ws = new ScreenDataWS(null, "TEST"); decimal sz = 0; decimal tz = 0; ws.Ws_OnMessage(new byte[] { 0x46, 0x52, 0x53, 0x1, 0x4, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); for (int i = 0; i < FileList.Count; i++) { Stopwatch st = new Stopwatch(); st.Start(); ws.Ws_OnMessage(new byte[] { 0x46, 0x52, 0x53, 0x1, 0x4, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); st.Stop(); tz += st.ElapsedMilliseconds; sz += 0; } sz /= (decimal)FileList.Count - 1; tz /= (decimal)FileList.Count - 1; Console.WriteLine("Pictures: " + (FileList.Count - 1) + " - AVG SZ=" + sz.ToString("0.00") + " bytes - AVG TZ= " + tz.ToString("0.0000") + " ms"); Assert.AreEqual(0, 0); #else Assert.Inconclusive("Unavalible in Release"); #endif }
public void TestGetDeltaScreen_via_WCF() { #if DEBUG if (Directory.Exists(PipeScreenData.Framebufferpath) == false) { Assert.Inconclusive("Cannot find " + PipeScreenData.Framebufferpath); return; } List <string> FileList = Directory.EnumerateFiles(PipeScreenData.Framebufferpath, "*.png", SearchOption.TopDirectoryOnly).ToList(); if (FileList == null || FileList.Count == 0) { Assert.Inconclusive("No PNG files in " + PipeScreenData.Framebufferpath); return; } ProgramAgent.Init(); if (ProgramAgent.LoadDLLForced(SystemInfos.CPUType.EM64T) == false) { Assert.Inconclusive("Cannot load Agent supplemental DLL"); } decimal sz = 0; decimal tz = 0; MainScreenSystem.Ping(); for (int i = 0; i < FileList.Count; i++) { Stopwatch st = new Stopwatch(); st.Start(); byte[] d = MainScreenSystem.GetDeltaScreen2Debug(); st.Stop(); tz += st.ElapsedMilliseconds; sz += d.Length; } sz /= (decimal)FileList.Count; tz /= (decimal)FileList.Count; Console.WriteLine("Pictures: " + FileList.Count + " - AVG SZ=" + sz.ToString("0.00") + " bytes - AVG TZ= " + tz.ToString("0.0000") + " ms"); Assert.AreEqual(0, 0); #else Assert.Inconclusive("Unavalible in Release"); #endif }