Exemplo n.º 1
0
        public void RefreshWorks()
        {
            var env = new Ex.Env();

            var d = new Mocks.JailbreakDetector(env);

            Assert.False(d.HasRun);

            Assert.False(d.IsJailbroken);

            Assert.True(d.HasRun);

            d.Refresh();

            Assert.False(d.HasRun);
        }
Exemplo n.º 2
0
        public void IsThreadsafeToDegreeReasonablyTestable()
        {
            var env = new Ex.Env();

            // Violations returns a shallow-copied list.
            var inspector = new Mocks.Inspector();

            inspector.Init(env, "OK", "asdf");

            var d = new Mocks.JailbreakDetector(env, new[] { inspector });

            var v1 = d.Violations;

            d.Refresh();
            var v2 = d.Violations;

            Assert.NotSame(v1, v2);

            // That's about as far as can be reasonably tested at the moment.
        }