public static void Add_ThrowsArgumentException_ForInvalidInput() { // Arrange var providers = new AssetProviderCollection(); var provider = new Mock <ProviderBase>().Object; // Act & Assert Assert.Throws <ArgumentException>(() => providers.Add(provider)); }
public static void Add_ThrowsArgumentNullException_ForNullInput() { // Arrange var providers = new AssetProviderCollection(); ProviderBase provider = null; // Act & Assert Assert.Throws <ArgumentNullException>(() => providers.Add(provider)); }
private static void InitializeDefault() { // Use the default provider. WARNING: Don't forget to initialize it too! var tmpProvider = new DefaultAssetProvider(); tmpProvider.Initialize(null, null); var tmpProviders = new AssetProviderCollection(); tmpProviders.Add(tmpProvider); tmpProviders.SetReadOnly(); s_Providers = tmpProviders; s_Provider = tmpProvider; }