public void CallsShutdownOrSavingDependingOnContext(
				[Values(Component.ShutdownContext.Saving, Component.ShutdownContext.Deactivate)]Component.ShutdownContext context,
				[Values(false, true)]bool expectedShutdownResult,
				[Values(true, false)]bool expectedSavingResult)
            {
                var component = new ScriptComponent { Script = TestScriptFactory.CreateScriptResource(TestScriptWithShutdown) };

                component.OnInit(Component.InitContext.Activate);
                component.SetScriptPropertyValue("ShutdownCalled", false);
                component.SetScriptPropertyValue("SavingCalled", false);
                component.OnShutdown(context);

                ((ICmpEditorUpdatable)component).OnUpdate();

                Assert.AreEqual(expectedShutdownResult, (bool)component.ScriptPropertyValues["ShutdownCalled"]);
                Assert.AreEqual(expectedSavingResult, (bool)component.ScriptPropertyValues["SavingCalled"]);
            }