Esempio n. 1
0
        public void TestUnattributedClassReturnsDefaultKey()
        {
            var typeMap = new TrapTypeMap();
            var key     = typeMap.GetTypeKey(typeof(UnmarkedTrap));

            Assert.IsNotNull(key);
            Assert.AreEqual(default(ObjectIdentifier), key);
        }
Esempio n. 2
0
        public void TestFakeTrapInputKey()
        {
            var typeMap = new TrapTypeMap();
            var inputKey = typeMap.GetInputKey(this.fakeIpPacket);

            Assert.AreEqual(new ObjectIdentifier("1.3.6.1.4.1.500.12"), inputKey);

            var typeKey = typeMap.GetTypeKey(typeof(FakeTrap));

            Assert.AreEqual(inputKey, typeKey);
        }
Esempio n. 3
0
        public void TestFakeTrapInputKey()
        {
            var typeMap  = new TrapTypeMap();
            var inputKey = typeMap.GetInputKey(this.fakeIpPacket);

            Assert.AreEqual(new ObjectIdentifier("1.3.6.1.4.1.500.12"), inputKey);

            var typeKey = typeMap.GetTypeKey(typeof(FakeTrap));

            Assert.AreEqual(inputKey, typeKey);
        }
Esempio n. 4
0
        public void TestUnattributedClassReturnsDefaultKey()
        {
            var typeMap = new TrapTypeMap();
            var key = typeMap.GetTypeKey(typeof(UnmarkedTrap));

            Assert.IsNotNull(key);
            Assert.AreEqual(default(ObjectIdentifier), key);
        }