Beispiel #1
0
        private static void TestNull(Type t)
        {
            var a = GetClass.Members(t);

            Assert.IsInstanceOfType(a, typeof(List <MemberInfo>));
            Assert.AreEqual(0, a.Count);
        }
Beispiel #2
0
        public virtual void IsTested()
        {
            var t = typeof(T);
            var m = GetClass.Members(t, GetPublic.Declared);

            Members = m.Select(e => e.Name).ToList();
            RemoveTested();
            if (Members.Count == 0)
            {
                return;
            }
            Assert.Inconclusive(NotTested, Members[0]);
        }
Beispiel #3
0
        private static void testMember(Type t)
        {
            var a = GetClass.Members(t, PublicBindingFlagsFor.AllMembers, false);
            var e = t.GetMembers(PublicBindingFlagsFor.AllMembers);

            Assert.AreEqual(e.Length, a.Count);
            Assert.AreEqual(10, a.Count);
            foreach (var v in e)
            {
                Assert.IsTrue(a.Contains(v));
            }
            Assert.AreEqual(7, GetClass.Members(t).Count);
        }
Beispiel #4
0
        public void isTested()
        {
            if (type == null)
            {
                Assert.Inconclusive(notSpecified);
            }
            var m = GetClass.Members(type, PublicBindingFlagsFor.DeclaredMembers);

            members = m.Select(e => e.Name).ToList();
            removeTested();
            if (members.Count == 0)
            {
                return;
            }
            Assert.Fail(notTested, members[0]);
        }
Beispiel #5
0
        public virtual void IsTested()
        {
            if (type == null)
            {
                Assert.Inconclusive(notSpecified);
            }
            var m = GetClass.Members(type, GetPublic.Declared);

            members = m.Select(e => e.Name).ToList();
            removeTested();
            if (members.Count == 0)
            {
                return;
            }
            Assert.Inconclusive(notTested, members[0]);
        }
        [TestMethod] public virtual void IsTested()
        {
            if (Type == null)
            {
                NotTested(NotSpecified);
            }
            var m = GetClass.Members(Type, PublicFlagsFor.Declared);

            Members = m.Select(e => e.Name).ToList();
            RemoveTested();
            if (Members.Count == 0)
            {
                return;
            }
            NotTested("<{0}> is not tested", Members[0]);
        }
Beispiel #7
0
        public void IsTested()
        {
            if (type == null)
            {
                Assert.Inconclusive(notSpecified);                                 //kui tuup pole maaratud, siis seda tuupi pole olemas
            }
            var m = GetClass.Members(type, PublicBindingFlagsFor.DeclaredMembers); //annab type katte

            members = m.Select(e => e.Name).ToList();
            removeTested();

            if (members.Count == 0)
            {
                return;
            }
            Assert.Fail(notTested, members[0]);
        }
Beispiel #8
0
        public void IsTested()
        {
            if (type == null)
            {
                Assert.Inconclusive(NotSpecified);               //kui tüüpi pole, siis annab ta mulle teada, et sellist tüüpi polegi
            }
            var m = GetClass.Members(type, PublicBindingFlagsFor.DeclaredMembers);

            Members = m.Select(e => e.Name).ToList();
            RemoveTested();

            if (Members.Count == 0)
            {
                return;
            }
            Assert.Fail(NotTested, Members[0]);
        }