Esempio n. 1
0
        public void NmOpenCaptureEngineManaged_ValidState_EngineReturned()
        {
            NetMonEngine eng = NetmonAPI.NmOpenCaptureEngineManaged();

            Assert.IsNotNull(eng, "NmOpenCaptureEngineManaged returned a null engine");
            eng.Dispose();
        }
Esempio n. 2
0
        public void NmGetAdaptersManaged_ValidEngine_AtLeastOneFound()
        {
            NM_NIC_ADAPTER_INFO[] adapters;
            using (var engine = NetmonAPI.NmOpenCaptureEngineManaged())
            {
                adapters = NetmonAPI.NmGetAdaptersManaged(engine);
            }

            Assert.IsTrue(adapters.Any(), "NmGetAdaptersManaged returned an empty array of adapters");
        }