public void RoundtripSerialize() { var original = GroupExportDefinition.CreateDefinition( "b", new GroupRegistrationId("a"), new List <ExportRegistrationId> { new ExportRegistrationId(typeof(string), 1, "a") }); var copy = AssertExtensions.RoundTripSerialize(original); Assert.AreEqual(original, copy); }
public void Create() { var groupId = new GroupRegistrationId("a"); var contractName = "b"; var imports = new List <ExportRegistrationId> { new ExportRegistrationId(typeof(string), 0, "a") }; var obj = GroupExportDefinition.CreateDefinition(contractName, groupId, imports); Assert.AreEqual(groupId, obj.ContainingGroup); Assert.AreEqual(contractName, obj.ContractName); Assert.That(obj.ProvidedExports, Is.EquivalentTo(imports)); }