예제 #1
0
        public void TestGetNoKeys()
        {
            var container = new TestContainer();

            PropertyInfo[] keys = container.GetKeys(typeof(TestNoKey));
            Assert.AreEqual(0, keys.Count());
        }
        public void TestGetNoKeys()
        {
            var container = new TestContainer();
            var keys      = container.GetKeys(typeof(TestNoKey));

            Assert.AreEqual(0, keys.Length);
        }
예제 #3
0
        public void TestGetKeys()
        {
            var container = new TestContainer();

            PropertyInfo[] keys = container.GetKeys(typeof(TestKey));
            Assert.AreEqual(1, keys.Count());
            Assert.AreSame(typeof(TestKey).GetProperty("AName"), keys.Single());
        }
예제 #4
0
        public void TestGetMultiKeys()
        {
            var container = new TestContainer();

            PropertyInfo[] keys = container.GetKeys(typeof(TestMultiKey));
            Assert.AreEqual(2, keys.Count());
            Assert.AreSame(typeof(TestMultiKey).GetProperty("AName"), keys.First());
            Assert.AreSame(typeof(TestMultiKey).GetProperty("AName1"), keys.Last());
        }