public void Constructor4_ValueAsContractNameArgument_ShouldSetDefinitionContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var export = new Export(e, new Dictionary <string, object>(), () => null); Assert.AreEqual(e, export.Definition.ContractName); } }
public void Constraint_ShouldIncludeContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var definition = new ContractBasedImportDefinition(e, (string)null, (IEnumerable <KeyValuePair <string, Type> >)null, ImportCardinality.ExactlyOne, true, false, CreationPolicy.Any); ConstraintAssert.Contains(definition.Constraint, e); } }
public void Constraint_ShouldIncludeOverriddenContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var definition = new DerivedContractBasedImportDefinition(e); ConstraintAssert.Contains(definition.Constraint, e); } }
public void Constructor2_ValueAsContractNameArgument_ShouldSetContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var definition = new ContractBasedImportDefinition(e, (string)null, Enumerable.Empty <KeyValuePair <string, Type> >(), ImportCardinality.ExactlyOne, false, false, CreationPolicy.Any); Assert.Equal(e, definition.ContractName); } }
public void Constructor2_ValueAsContractNameArgument_ShouldSetContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var definition = new ExportDefinition(e, new Dictionary <string, object>()); Assert.Equal(e, definition.ContractName); } }
public void ToString_ShouldReturnContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var definition = new ExportDefinition(e, new Dictionary <string, object>()); Assert.Equal(e, definition.ToString()); } }
public void Constructor3_ValueAsContractNameArgument_ShouldSetDefinitionContractNameProperty() { var expectations = Expectations.GetContractNames(); foreach (var e in expectations) { var export = new Export(e, () => null); Assert.Equal(e, export.Definition.ContractName); } }
public void TryParseConstraint_ConstraintFromCreateConstraintAsConstraintArgument3_CanParse() { var contractNames = Expectations.GetContractNames(); var metadataValues = Expectations.GetRequiredMetadata(); foreach (var contractName in contractNames) { foreach (var metadataValue in metadataValues) { var constraint = ConstraintServices.CreateConstraint(contractName, null, metadataValue, CreationPolicy.Any); AssertCanParse(constraint, contractName, metadataValue); } } }