コード例 #1
0
        public void TestCNoId()
        {
            _collection.RemoveAll();

            var document = new CNoId {
                A = 1
            };

            Assert.Throws <InvalidOperationException>(() => _collection.Save(document));
        }
コード例 #2
0
        public void TestCNoId() {
            collection.RemoveAll();

            var document = new CNoId { A = 1 };
            Assert.Throws<InvalidOperationException>(() => collection.Save(document));
        }
コード例 #3
0
        public void TestCNoId()
        {
            collection.RemoveAll();

            var document = new CNoId { A = 1 };
            collection.Save(document);
            Assert.AreEqual(1, collection.Count());

            collection.Save(document);
            Assert.AreEqual(2, collection.Count());
        }