コード例 #1
0
        public void updateProject_Class_Attribute()
        {
            _mDB = new MongoDBCore();
            var projets = _mDB.getAll <Project>();

            projets[0].NameSpace = "updated";
            var filter = Builders <Project> .Filter.Eq(s => s._id, projets[0]._id);

            var result = _mDB.update(filter, projets[0]);

            Assert.AreEqual(true, result != null);
        }
コード例 #2
0
        public void addClassToProject()
        {
            _mDB = new MongoDBCore();
            var projets = _mDB.getAll <Project>();

            projets[0].ProjectClasses.Add(new ProjectClass {
                Name = "pussy"
            });
            var filter = Builders <Project> .Filter.Eq(s => s._id, projets[0]._id);

            var result = _mDB.update(filter, projets[0]);

            Assert.AreEqual(true, result != null);
        }