public void Standard_GetSlice_Columns()
        {
            // arrange
            int expectedCount = 2;

            // act
            var columns = _family.Get(new BytesType[] { _testKey, _testKey2 }, new AsciiType[] { "Test1", "Test2" });

            // assert
            Assert.AreEqual(expectedCount, columns.Count());
        }
        public void Standard_GetSlice_Columns()
        {
            // arrange
            int expectedCount = 2;

            // act
            var columns = _family
                          .Get(_testKey, _testKey2)
                          .FetchColumns(new AsciiType[] { "Test1", "Test2" })
                          .Execute();

            // assert
            Assert.Equal(expectedCount, columns.Count());
        }
        public void ColumnFamily()
        {
            // arrange
            double         value      = Math.PI;
            DateTimeOffset timestamp  = DateTimeOffset.UtcNow;
            int            timeToLive = 1;

            // act
            _family.InsertColumn(_testKey, _testName, value, timestamp, timeToLive);
            var column = _family.Get(_testKey).Execute();
            var actual = column.FirstOrDefault().Columns.FirstOrDefault();

            // assert
            Assert.Equal(_testName, (string)actual.ColumnName);
            Assert.Equal(value, (double)actual.ColumnValue);
        }
        public Dummy Get(string id)
        {
            dynamic dummy = _dummies.Get(id).FirstOrDefault();

            return(((IList <FluentColumn>)dummy.Columns).Count == 0?
                   null :
                   new Dummy()
            {
                Id = id,
                Blob = dummy.Blob
            });
        }
Beispiel #5
0
		public void Query_Single_Column()
		{
			// arrange
			var expected = Math.PI;

			// act
			var actual = _family.Get(_testKey).FetchColumns(_testName).FirstOrDefault().AsDynamic().Test1;

			// assert
			Assert.Equal(expected, (double)actual);
		}
Beispiel #6
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);
        }
Beispiel #7
0
 public IFluentColumnFamily <AsciiType> Get(Guid postKey)
 {
     return(_family.Get(postKey)
            .FirstOrDefault());
 }