예제 #1
0
        public void TestUnattributedClassReturnsDefaultKey()
        {
            var typeMap = new TrapTypeMap();
            var key     = typeMap.GetTypeKey(typeof(UnmarkedTrap));

            Assert.IsNotNull(key);
            Assert.AreEqual(default(ObjectIdentifier), key);
        }
예제 #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);
        }
예제 #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);
        }
예제 #4
0
        public void TestUnattributedClassReturnsDefaultKey()
        {
            var typeMap = new TrapTypeMap();
            var key = typeMap.GetTypeKey(typeof(UnmarkedTrap));

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