Exemplo n.º 1
0
        public void TimestampIndexedSingleInsert()
        {
            TimestampIndexedFieldEntity timestamp = new TimestampIndexedFieldEntity();
            timestamp.Data = "New record";

            context.TimestampIndexedFieldEntities.Add(timestamp);
            context.SaveChanges();

            Assert.IsTrue(timestamp.Timestamp.Any(b => b > 0));
        }
Exemplo n.º 2
0
        public void TimestampIndexedDoubleInsert()
        {
            TimestampIndexedFieldEntity timestamp = new TimestampIndexedFieldEntity();
            timestamp.Data = "New record1";
            context.TimestampIndexedFieldEntities.Add(timestamp);

            TimestampIndexedFieldEntity timestamp2 = new TimestampIndexedFieldEntity();
            timestamp2.Data = "New record2";
            context.TimestampIndexedFieldEntities.Add(timestamp2);

            context.SaveChanges();

            Assert.IsTrue(timestamp.Timestamp.Any(b => b > 0));
            Assert.IsTrue(timestamp2.Timestamp.Any(b => b > 0));
            context.TimestampIndexedFieldEntities.Count().Should().Be(2);
        }