Ejemplo n.º 1
0
        public void ExceptionScanTest()
        {
            // inject a type from the fuzzing assembly to check for some degenerative case
            var temp = new NoNameSpaceType();

            Check.That(ExceptionHelper.BuildException("Test")).IsInstanceOf <XunitException>();
            Check.That(2).IsEqualTo(2);
            Check.ThatCode(() => Check.That(2).IsEqualTo(0)).IsAFailingCheck();
        }
Ejemplo n.º 2
0
        public void ExceptionScanTest()
        {
            // generate a dynamic assembly.
            /* Purpose: dynamic assemblies do not support runtime type discovery and may break unit test framework exception*/
            var tester = MyTypeBuilder.CreateNewObject();
            // inject a type from the fuzzing assembly to check for some degenerative case
            /* Purpose: type in root namespace have a namespace property set as null that may be the source of NRE.*/
            var temp = new NoNameSpaceType();

            Check.That(ExceptionHelper.BuildException("Test")).IsInstanceOf <XunitException>();
            Check.That(2).IsEqualTo(2);
            Check.ThatCode(() => Check.That(2).IsEqualTo(0)).IsAFailingCheck();
        }