Beispiel #1
0
        public void IsSupportedTextureFileFormat_ShouldReturnTrue_WhenFileExtensionIsOfSupportedTextureFileFormat(string fileExtension,
                                                                                                                  bool expectedIsSupported)
        {
            // Arrange
            // Act
            var isSupported = AssetTool.IsSupportedTextureFileFormat(fileExtension);

            // Assert
            Assert.That(isSupported, Is.EqualTo(expectedIsSupported));
        }
        private void CreateContextMenuActions()
        {
            if (AssetTool.IsSupportedTextureFileFormat(_file.Extension))
            {
                var command = _createTextureAssetCommandFactory.Create(_file);
                ContextMenuItems.Add(new ContextMenuItem("Create texture asset", command));
            }

            if (AssetTool.CanCreateSpriteAssetFromFile(_file.Path))
            {
                var command = _createSpriteAssetCommandFactory.Create(_file);
                ContextMenuItems.Add(new ContextMenuItem("Create sprite asset", command));
            }

            if (AssetTool.IsSupportedSoundFileFormat(_file.Extension))
            {
                var command = _createSoundAssetCommandFactory.Create(_file);
                ContextMenuItems.Add(new ContextMenuItem("Create sound asset", command));
            }
        }