public void Metadata_DerivedExportDefinition_ShouldReturnDefinitionMetadata() { var expectations = Expectations.GetMetadata(); foreach (var e in expectations) { var definition = ExportDefinitionFactory.Create("ContractName", e); var export = new DerivedExport(definition); EnumerableAssert.AreEqual(e, export.Metadata); } }
public void GetExportedValue_ShouldCacheOverrideGetExportedValueCore() { int count = 0; var export = new DerivedExport(() => { count++; return(count); }); Assert.AreEqual(1, export.Value); Assert.AreEqual(1, export.Value); Assert.AreEqual(1, export.Value); }
public void GetExportedValue_ShouldCacheOverrideGetExportedValueCore() { int count = 0; var export = new DerivedExport(() => { count++; return count; }); Assert.AreEqual(1, export.Value); Assert.AreEqual(1, export.Value); Assert.AreEqual(1, export.Value); }