Beispiel #1
0
        public void RegisterAPIScriptBlock_ClientScriptInclude_ScriptIncluded()
        {
            // Arrange
            var toolColorPicker = new ToolColorPicker
            {
                Page = new Page()
            };

            using (ShimsContext.Create())
            {
                ShimClientScriptManager.AllInstances.GetWebResourceUrlTypeString = (type, obj1, obj2) => DummyUrl;

                // Act
                toolColorPicker.RegisterAPIScriptBlock();

                // Assert
                toolColorPicker.Page.ClientScript.IsClientScriptIncludeRegistered(ActiveToolbarScriptKey).ShouldBeTrue();
            }
        }