public void ListWrappingConstructor() { // Arrange ModelBinderProvider[] providers = new[] { new Mock <ModelBinderProvider>().Object, new Mock <ModelBinderProvider>().Object }; // Act ModelBinderProviderCollection collection = new ModelBinderProviderCollection(providers); // Assert Assert.Equal(providers, collection.ToArray()); }
public void SetItem() { // Arrange ModelBinderProvider provider0 = new Mock <ModelBinderProvider>().Object; ModelBinderProvider provider1 = new Mock <ModelBinderProvider>().Object; ModelBinderProvider provider2 = new Mock <ModelBinderProvider>().Object; ModelBinderProviderCollection collection = new ModelBinderProviderCollection(); collection.Add(provider0); collection.Add(provider1); // Act collection[1] = provider2; // Assert Assert.Equal(new[] { provider0, provider2 }, collection.ToArray()); }