Beispiel #1
0
        public void VerifyAllPublicClassesHaveToString()
        {
            Assembly assembly = EseInteropTestHelper.GetAssembly(typeof(Api));
            var      classes  = FindPublicClassesWithoutToString(assembly);
            int      classesWithoutToString = 0;

            foreach (Type @class in classes)
            {
                EseInteropTestHelper.ConsoleWriteLine("{0} does not override Object.ToString", @class);
                ++classesWithoutToString;
            }

            Assert.AreEqual(0, classesWithoutToString, "Some classes do not override Object.ToString()");
        }
Beispiel #2
0
        public void VerifyAllPublicMethodsAreTests()
        {
            Assembly assembly = EseInteropTestHelper.GetAssembly(this.GetType());
            var      methods  = FindPublicNonTestMethods(assembly);

            if (methods.Length > 0)
            {
                EseInteropTestHelper.ConsoleWriteLine("{0} public methods have no [TestMethod] attribute", methods.Length);
                foreach (string m in methods)
                {
                    EseInteropTestHelper.ConsoleWriteLine("\t{0}", m);
                }

                Assert.Fail("A public method is not a test. Missing a [TestMethod] attribute?");
            }
        }
Beispiel #3
0
        public void VerifyAllTestMethodsHavePriorities()
        {
            Assembly assembly = EseInteropTestHelper.GetAssembly(this.GetType());

            VerifyAllTestMethodsHaveAttribute <PriorityAttribute>(assembly);
        }
Beispiel #4
0
        public void VerifyAllTestMethodsHaveDescriptions()
        {
            Assembly assembly = EseInteropTestHelper.GetAssembly(this.GetType());

            VerifyAllTestMethodsHaveAttribute <DescriptionAttribute>(assembly);
        }