Ejemplo n.º 1
0
        public void TestRemoveUserAttribute()
        {
            PersistenceManager persistenceManager = new PersistenceManager(MParticleOptions.Builder("foo", "bar").Build());

            persistenceManager.Initialize(Package.Current.Id.Version);
            var user = new MParticleUser(5, persistenceManager);

            user.UserTag("foo user attribute tag 1");
            user.UserTag("foo user attribute tag 2");
            Assert.AreEqual(2, user.UserAttributes.Count);
            user.RemoveUserAttribute("foo user attribute tag 1");
            Assert.AreEqual(1, user.UserAttributes.Count);
        }
Ejemplo n.º 2
0
        public void TestSetUserAttributeTag()
        {
            PersistenceManager persistenceManager = new PersistenceManager(MParticleOptions.Builder("foo", "bar").Build());

            persistenceManager.Initialize(Package.Current.Id.Version);
            var user = new MParticleUser(5, persistenceManager);

            user.UserTag("foo user attribute tag");
            Assert.AreEqual(1, user.UserAttributes.Count);
            Assert.IsTrue(user.UserAttributes.ContainsKey("foo user attribute tag"));
        }