Esempio n. 1
0
        public void TestAddProfileToUser()
        {
            var mss = new MongoSuperService(MongoTestIP);
            var p   = new Profile
            {
                Name           = "Rainbow",
                Configurations = new Dictionary <string, dynamic>()
            };

            if (!mss.Exists("Ben"))
            {
                var u = new User
                {
                    UserName = "******",
                    Password = "******",
                    Profiles = new List <Profile>()
                };
                mss.AddUser(u);
            }
            p.Configurations.Add("keyboard", "red");
            mss.AddProfileToUser("Ben", p);
        }
Esempio n. 2
0
        public void TestJohnDoesNotExist()
        {
            var mss = new MongoSuperService(MongoTestIP);

            Assert.IsFalse(mss.Exists("John"));
        }
Esempio n. 3
0
        public void TestBenExists()
        {
            var mss = new MongoSuperService(MongoTestIP);

            Assert.IsTrue(mss.Exists("Ben"));
        }