/// <summary> /// Initializes a new instance of the StringResourceVerifier class. /// </summary> /// <param name="lookup"> Lookup to be used for locating string resources </param> public StringResourceVerifier(AssemblyResourceLookup lookup) { _lookup = lookup; }
public void Set_properties_for_generic_types_throw() { try { new GenericVariant(); Assert.True(false); } catch (InvalidOperationException ex) { var resourceLookup = new AssemblyResourceLookup(EntityFrameworkAssembly, "System.Data.Entity.Properties.Resources"); var messageTemplate = resourceLookup.LookupString("InvalidEntityType"); var message = String.Format(CultureInfo.InvariantCulture, messageTemplate, typeof(List<Product>)); Assert.Equal(message, ex.Message); } }