Exemplo n.º 1
0
        public void CanCallAMethodInADelegatedClass()
        {
            // Arrange
            var compiler = new CSharpScriptCompiler();
            var script = compiler.CompileScript("AbortIf(true)", typeof(TestScriptPropertyEnvironment));

            // Act
            var environment = new TestScriptPropertyEnvironment();
            script.Run(environment);

            // Assert
            environment.Abort.ShouldBeTrue();
        }
Exemplo n.º 2
0
        public void CanCallAMethodInADelegatedClass()
        {
            // Arrange
            var compiler = new CSharpScriptCompiler();
            var script   = compiler.CompileScript("AbortIf(true)", typeof(TestScriptPropertyEnvironment));

            // Act
            var environment = new TestScriptPropertyEnvironment();

            script.Run(environment);

            // Assert
            environment.Abort.ShouldBeTrue();
        }