public void AddExplicitDependencies()
        {
            _serializer.AddExplicitDependencies(new[] { typeof(int), typeof(string) });

            var deserializer = new AttributeMixinContextDeserializer(_serializer.Values);

            Assert.That(deserializer.GetExplicitDependencies(), Is.EqualTo(new[] { typeof(int), typeof(string) }));
        }
        public void AddIntroducedMemberVisibility()
        {
            _serializer.AddIntroducedMemberVisibility(MemberVisibility.Public);

            var deserializer = new AttributeMixinContextDeserializer(_serializer.Values);

            Assert.That(deserializer.GetIntroducedMemberVisibility(), Is.EqualTo(MemberVisibility.Public));
        }
        public void AddMixinKind()
        {
            _serializer.AddMixinKind(MixinKind.Used);

            var deserializer = new AttributeMixinContextDeserializer(_serializer.Values);

            Assert.That(deserializer.GetMixinKind(), Is.EqualTo(MixinKind.Used));
        }
        public void AddMixinType()
        {
            _serializer.AddMixinType(typeof(DateTime));

            var deserializer = new AttributeMixinContextDeserializer(_serializer.Values);

            Assert.That(deserializer.GetMixinType(), Is.EqualTo(typeof(DateTime)));
        }
        public void AddOrigin()
        {
            var mixinContextOrigin = MixinContextOriginObjectMother.Create(assembly: GetType().Assembly);

            _serializer.AddOrigin(mixinContextOrigin);

            // Check that the chain of serializers correctly sets up the AttributeMixinContextOriginSerializer
            var serializedMixinOrigin         = (object[])_serializer.Values[4];
            var serializedMixinOriginAssembly = serializedMixinOrigin[1];

            Assert.That(serializedMixinOriginAssembly, Is.EqualTo(GetType().Assembly.FullName));

            var deserializer = new AttributeMixinContextDeserializer(_serializer.Values);

            Assert.That(deserializer.GetOrigin(), Is.EqualTo(mixinContextOrigin));
        }
 public void SetUp()
 {
     _serializer          = new AttributeMixinContextSerializer();
     _invalidDeserializer = new AttributeMixinContextDeserializer(new object[] { 1, 2, 3, 4, 5 });
 }