public void TestTransform()
        {
            ExtractorEventTransformer transformer = new ExtractorEventTransformer(null, IdentityExtractor.Instance);

            LocalCache     cache  = new LocalCache();
            CacheEventArgs evt    = new CacheEventArgs(cache, CacheEventType.Inserted, "inserted", "old value", "new value", false);
            CacheEventArgs evtNew = transformer.Transform(evt);

            Assert.IsNotNull(evtNew);
            Assert.AreEqual(evt.Cache, evtNew.Cache);
            Assert.AreEqual(evt.EventType, evtNew.EventType);
            Assert.AreEqual(evt.Key, evtNew.Key);
            Assert.AreNotEqual(evt.OldValue, evtNew.OldValue);
            Assert.IsNotNull(evt.OldValue);
            Assert.IsNull(evtNew.OldValue);
            Assert.AreEqual(evt.NewValue, evtNew.NewValue);
            Assert.AreEqual(evt.IsSynthetic, evtNew.IsSynthetic);

            evt = ConverterCollections.GetCacheEventArgs(cache, evt,
                                                         NullImplementation.GetConverter(), NullImplementation.GetConverter());
            Assert.IsNotNull(evt);
            Assert.IsInstanceOf(typeof(ConverterCollections.ConverterCacheEventArgs), evt);
            ConverterCollections.ConverterCacheEventArgs convEvt = evt as ConverterCollections.ConverterCacheEventArgs;
            Assert.IsNotNull(convEvt);
            evtNew = transformer.Transform(convEvt);
            Assert.IsNotNull(evtNew);
        }
 /// <summary>
 /// Compare the <b>ExtractorEventTransformer</b> with another object
 /// to determine equality.
 /// </summary>
 /// <param name="that">
 /// The object to compare with the current object.
 /// </param>
 /// <returns>
 /// <b>true</b> if this <b>ExtractorEventTransformer</b> and the
 /// passed object are equivalent.
 /// </returns>
 public bool Equals(ExtractorEventTransformer that)
 {
     if (ReferenceEquals(null, that))
     {
         return(false);
     }
     if (ReferenceEquals(this, that))
     {
         return(true);
     }
     return(Equals(that.m_extractorOld, m_extractorOld) &&
            Equals(that.m_extractorNew, m_extractorNew));
 }
        public void TestSerialization()
        {
            ConfigurablePofContext ctx = new ConfigurablePofContext("assembly://Coherence.Tests/Tangosol.Resources/s4hc-test-config.xml");

            Assert.IsNotNull(ctx);

            ExtractorEventTransformer extractorEventTransformer = new ExtractorEventTransformer("methodName1");

            Stream stream = new MemoryStream();

            ctx.Serialize(new DataWriter(stream), extractorEventTransformer);

            stream.Position = 0;
            Assert.AreEqual(extractorEventTransformer, ctx.Deserialize(new DataReader(stream)));

            stream.Close();
        }