Example #1
0
        public void RoundtripSerialize()
        {
            var original = MethodBasedExportDefinition.CreateDefinition("B", GetMethodForInt());
            var copy     = AssertExtensions.RoundTripSerialize(original);

            Assert.AreEqual(original, copy);
        }
Example #2
0
        public void Create()
        {
            var obj = MethodBasedExportDefinition.CreateDefinition("B", GetMethodForInt());

            Assert.AreEqual("B", obj.ContractName);
            Assert.AreEqual(TypeIdentity.CreateDefinition(typeof(int)), obj.DeclaringType);
            Assert.AreEqual(MethodDefinition.CreateDefinition(GetMethodForInt()), obj.Method);
        }