public static void GetFontUri_ThrowsArgumentNullException_ForNullPath() { // Arrange var provider = new RemoteAssetProvider(); var config = new NameValueCollection(1); config.Add("baseUri", "http://tempuri.org/"); provider.Initialize("MyName", config); // Act & Assert Assert.Throws <ArgumentNullException>(() => provider.GetFontUri(null)); }
public static void GetFontUri_ThrowsArgumentException_ForAbsolutePath() { // Arrange var provider = new RemoteAssetProvider(); var config = new NameValueCollection(1); config.Add("baseUri", "http://tempuri.org/"); provider.Initialize("MyName", config); // Act & Assert Assert.Throws <ArgumentOutOfRangeException>(() => provider.GetFontUri("/my/absolute/font/path")); }
public static void GetFontUri_ReturnsExpectedResult(string value, string expectedValue) { // Arrange var provider = new RemoteAssetProvider(); var config = new NameValueCollection(1); config.Add("baseUri", "http://tempuri.org/"); provider.Initialize("MyName", config); // Act var resultUri = provider.GetFontUri(value); // Act & Assert Assert.Equal(expectedValue, resultUri.ToString()); }