From d2387beb0b41557c56adf056f073c99ff9cf1b3a Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Thu, 4 Jan 2024 23:30:41 +0800 Subject: [PATCH] test: add a test case for Registry Signed-off-by: Shiwei Zhang --- .../RemoteTest/RegistryTest.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs b/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs index 1bc4f0d..b51586c 100644 --- a/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs +++ b/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs @@ -24,7 +24,6 @@ namespace OrasProject.Oras.Tests.RemoteTest { public class RegistryTest { - public static HttpClient CustomClient(Func func) { var moqHandler = new Mock(); @@ -36,6 +35,18 @@ public static HttpClient CustomClient(Func + /// Test registry constructor + /// + [Fact] + public void Registry() + { + var registryName = "foobar"; + var registry = new Remote.Registry(registryName); + var options = registry.RepositoryOptions; + Assert.Equal(registryName, options.Reference.Registry); + } + /// /// PingAsync tests the PingAsync method of the Registry class. ///