public void ExportingStaticMembers(IContainer container) { var part = container.GetExportedValue <ImportingPart>(); Assert.Equal(PartWithStaticExports.ExportingProperty, part.ImportOfProperty); Assert.Equal(PartWithStaticExports.ExportingField, part.ImportOfField); Assert.Equal(PartWithStaticExports.ExportingMethod(), part.ImportOfMethod()); }
public void GetExportsOfExportingStaticMembers(IContainer container) { Assert.Equal(PartWithStaticExports.ExportingProperty, container.GetExportedValue <string>("Property")); Assert.Equal(PartWithStaticExports.ExportingField, container.GetExportedValue <string>("Field")); Assert.Equal(PartWithStaticExports.ExportingMethod(), container.GetExportedValue <Func <string> >("Method")()); }