public void Test_Add_WhenExists_ThrowInvalidOperationException()
        {
            var collection = new CouchbaseSet<Poco>(_bucket, "Test_Add_WhenExists_ThrowInvalidOPerationException");
            collection.Clear();

            collection.Add(new Poco {Key = "poco1", Name = "Poco-pica"});
            Assert.Throws<InvalidOperationException>(() => collection.Add(new Poco { Key = "poco1", Name = "Poco-pica" }));
        }
        public void Test_Clear()
        {
            var collection = new CouchbaseSet<Poco>(_bucket, "CouchbaseSetTests_Test_Clear");
            collection.Add(new Poco { Key = "poco1", Name = "Poco-pica" });
            collection.Clear();

            Assert.AreEqual(0, collection.Count);
        }
        public void Test_Add()
        {
            var collection = new CouchbaseSet<Poco>(_bucket, "CouchbaseSetTests_Test_Add");
            collection.Clear();

            collection.Add(new Poco {Key = "poco1", Name = "Poco-pica"});
            collection.Add(new Poco {Key = "poco2", Name = "Poco-pica2"});
        }
Esempio n. 4
0
        public void Test_Clear()
        {
            var collection = new CouchbaseSet <Poco>(_bucket, "CouchbaseSetTests_Test_Clear");

            collection.Add(new Poco {
                Key = "poco1", Name = "Poco-pica"
            });
            collection.Clear();

            Assert.AreEqual(0, collection.Count);
        }
Esempio n. 5
0
        public void Test_Add()
        {
            var collection = new CouchbaseSet <Poco>(_bucket, "CouchbaseSetTests_Test_Add");

            collection.Clear();

            collection.Add(new Poco {
                Key = "poco1", Name = "Poco-pica"
            });
            collection.Add(new Poco {
                Key = "poco2", Name = "Poco-pica2"
            });
        }
Esempio n. 6
0
        public void Test_Add_WhenExists_ThrowInvalidOperationException()
        {
            var collection = new CouchbaseSet <Poco>(_bucket, "Test_Add_WhenExists_ThrowInvalidOPerationException");

            collection.Clear();

            collection.Add(new Poco {
                Key = "poco1", Name = "Poco-pica"
            });
            Assert.Throws <InvalidOperationException>(() => collection.Add(new Poco {
                Key = "poco1", Name = "Poco-pica"
            }));
        }