Example #1
0
        public void CounterColumnFamily()
        {
            //arrange
            long value = 1L;

            //act
            _counterFamily.InsertCounterColumn(_testKey, _testName, value);
            var column = _counterFamily.Get(_testKey).Execute();
            var actual = column.FirstOrDefault().Columns.FirstOrDefault();

            // assert
            Assert.Equal(_testName, (string)actual.ColumnName);
            Assert.Equal(value, (double)actual.ColumnValue);
        }
        public void ResetCounterColumnFamily(CassandraColumnFamily counterFamily = null)
        {
            counterFamily = counterFamily ?? CounterFamily;

            counterFamily.RemoveAllRows();

            counterFamily.InsertCounterColumn(TestKey1, "Test1", 1);
            counterFamily.InsertCounterColumn(TestKey1, "Test2", 2);
            counterFamily.InsertCounterColumn(TestKey1, "Test3", 3);

            counterFamily.InsertCounterColumn(TestKey2, "Test1", 2);
            counterFamily.InsertCounterColumn(TestKey2, "Test2", 4);
            counterFamily.InsertCounterColumn(TestKey2, "Test3", 6);
        }
		public void ResetCounterColumnFamily(CassandraColumnFamily counterFamily = null)
		{
			counterFamily = counterFamily ?? CounterFamily;

			counterFamily.RemoveAllRows();

			counterFamily.InsertCounterColumn(TestKey1, "Test1", 1);
			counterFamily.InsertCounterColumn(TestKey1, "Test2", 2);
			counterFamily.InsertCounterColumn(TestKey1, "Test3", 3);

			counterFamily.InsertCounterColumn(TestKey2, "Test1", 2);
			counterFamily.InsertCounterColumn(TestKey2, "Test2", 4);
			counterFamily.InsertCounterColumn(TestKey2, "Test3", 6);
		}