Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions src/c#/ExtensionTest/Metadata/AvailableExtensionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ public void Constructor_ShouldSetIsPreReleaseToFalse()
Assert.False(extension.IsPreRelease);
}

/// <summary>
/// Tests that a new AvailableExtension has DownloadCount initialized to null.
/// </summary>
[Fact]
public void Constructor_ShouldSetDownloadCountToNull()
{
// Act
var extension = new AvailableExtension();

// Assert
Assert.Null(extension.DownloadCount);
}

/// <summary>
/// Tests that Descriptor property can be set and retrieved.
/// </summary>
Expand Down Expand Up @@ -85,54 +72,5 @@ public void IsPreRelease_CanBeSetToTrue()
// Assert
Assert.True(extension.IsPreRelease);
}

/// <summary>
/// Tests that DownloadCount property can be set and retrieved.
/// </summary>
[Fact]
public void DownloadCount_CanBeSetAndRetrieved()
{
// Arrange
var extension = new AvailableExtension();
var expectedCount = 10000L;

// Act
extension.DownloadCount = expectedCount;

// Assert
Assert.Equal(expectedCount, extension.DownloadCount);
}

/// <summary>
/// Tests that DownloadCount can be set to zero.
/// </summary>
[Fact]
public void DownloadCount_CanBeSetToZero()
{
// Arrange
var extension = new AvailableExtension();

// Act
extension.DownloadCount = 0;

// Assert
Assert.Equal(0, extension.DownloadCount);
}

/// <summary>
/// Tests that DownloadCount can be set back to null after having a value.
/// </summary>
[Fact]
public void DownloadCount_CanBeSetBackToNull()
{
// Arrange
var extension = new AvailableExtension { DownloadCount = 1000 };

// Act
extension.DownloadCount = null;

// Assert
Assert.Null(extension.DownloadCount);
}
}
}
40 changes: 0 additions & 40 deletions src/c#/ExtensionTest/Metadata/ExtensionDescriptorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,40 +195,6 @@ public void Categories_CanBeSetAndRetrieved()
Assert.Same(expectedCategories, descriptor.Categories);
}

/// <summary>
/// Tests that Icon property can be set and retrieved.
/// </summary>
[Fact]
public void Icon_CanBeSetAndRetrieved()
{
// Arrange
var descriptor = new ExtensionDescriptor();
var expectedIcon = "icon.png";

// Act
descriptor.Icon = expectedIcon;

// Assert
Assert.Equal(expectedIcon, descriptor.Icon);
}

/// <summary>
/// Tests that Repository property can be set and retrieved.
/// </summary>
[Fact]
public void Repository_CanBeSetAndRetrieved()
{
// Arrange
var descriptor = new ExtensionDescriptor();
var expectedRepository = "https://github.com/user/repo";

// Act
descriptor.Repository = expectedRepository;

// Assert
Assert.Equal(expectedRepository, descriptor.Repository);
}

/// <summary>
/// Tests that SupportedPlatforms property can be set and retrieved.
/// </summary>
Expand Down Expand Up @@ -456,8 +422,6 @@ public void NullableProperties_CanBeSetToNull()
Publisher = "Publisher",
License = "MIT",
Categories = new List<string>(),
Icon = "icon.png",
Repository = "repo",
DownloadUrl = "url",
PackageHash = "hash",
ReleaseDate = DateTime.Now,
Expand All @@ -470,8 +434,6 @@ public void NullableProperties_CanBeSetToNull()
descriptor.Publisher = null;
descriptor.License = null;
descriptor.Categories = null;
descriptor.Icon = null;
descriptor.Repository = null;
descriptor.DownloadUrl = null;
descriptor.PackageHash = null;
descriptor.ReleaseDate = null;
Expand All @@ -483,8 +445,6 @@ public void NullableProperties_CanBeSetToNull()
Assert.Null(descriptor.Publisher);
Assert.Null(descriptor.License);
Assert.Null(descriptor.Categories);
Assert.Null(descriptor.Icon);
Assert.Null(descriptor.Repository);
Assert.Null(descriptor.DownloadUrl);
Assert.Null(descriptor.PackageHash);
Assert.Null(descriptor.ReleaseDate);
Expand Down
6 changes: 0 additions & 6 deletions src/c#/GeneralUpdate.Extension/Metadata/AvailableExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,5 @@ public class AvailableExtension
/// Pre-release versions are typically beta or alpha builds.
/// </summary>
public bool IsPreRelease { get; set; }

/// <summary>
/// Gets or sets the total number of times this extension has been downloaded.
/// Null if download statistics are not available.
/// </summary>
public long? DownloadCount { get; set; }
}
}
12 changes: 0 additions & 12 deletions src/c#/GeneralUpdate.Extension/Metadata/ExtensionDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,6 @@ public class ExtensionDescriptor
[JsonPropertyName("categories")]
public List<string>? Categories { get; set; }

/// <summary>
/// Gets or sets the icon path for the extension (relative to package root).
/// </summary>
[JsonPropertyName("icon")]
public string? Icon { get; set; }

/// <summary>
/// Gets or sets the repository URL for the extension source code.
/// </summary>
[JsonPropertyName("repository")]
public string? Repository { get; set; }

/// <summary>
/// Gets or sets the platforms supported by this extension.
/// Uses flags to allow multiple platform targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,6 @@ private Task GenerateManifestAsync(string targetDirectory, Metadata.ExtensionDes
manifest["categories"] = descriptor.Categories;
}

if (!string.IsNullOrEmpty(descriptor.Icon))
{
manifest["icon"] = descriptor.Icon;
}

if (!string.IsNullOrEmpty(descriptor.Repository))
{
manifest["repository"] = descriptor.Repository;
}

// Add engine/compatibility information
if (descriptor.Compatibility != null)
{
Expand Down
4 changes: 0 additions & 4 deletions src/c#/GeneralUpdate.Extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ Extensions use a descriptor structure aligned with VS Code's package.json format
"maxHostVersion": "2.0.0"
},
"categories": ["Programming Languages", "Debuggers"],
"icon": "icon.png",
"repository": "https://github.com/user/repo",
"supportedPlatforms": 7
}
```
Expand Down Expand Up @@ -362,8 +360,6 @@ var descriptor = new Metadata.ExtensionDescriptor
Publisher = "publisher-name",
License = "MIT",
Categories = new List<string> { "Programming Languages" },
Icon = "icon.png",
Repository = "https://github.com/user/repo",
SupportedPlatforms = Metadata.TargetPlatform.All,
Compatibility = new Metadata.VersionCompatibility
{
Expand Down
Loading