Пример #1
0
        public void TestWaitExtensionMethod()
        {
            var denso = Session.New;

            var item = new TestDataModel();

            item.DateValue1   = new DateTime(1975, 02, 13);
            item.IntValue1    = 99;
            item.StringValue1 = "jdasljdlas";

            denso.Set(item).Wait();
            denso.Flush <TestDataModel>().Wait();

            Assert.AreEqual(0, denso.Count <TestDataModel>());
        }
Пример #2
0
        private static TestDataModel CreateSingleItem(Action <TestDataModel> refineaction = null)
        {
            var item = new TestDataModel();

            Random rnd = new Random();

            item.DateValue1 = new DateTime(rnd.Next(30) + 1970, rnd.Next(11) + 1, rnd.Next(27) + 1);
            item.IntValue1  = (int)rnd.Next();

            item.StringValue1 = string.Format("TestItem{0}", rnd.Next(100));

            if (refineaction != null)
            {
                refineaction(item);
            }
            return(item);
        }
Пример #3
0
    private static TestDataModel CreateSingleItem(Action<TestDataModel> refineaction = null)
    {
      var item = new TestDataModel();

      Random rnd = new Random();
      item.DateValue1 = new DateTime(rnd.Next(30) + 1970, rnd.Next(11) + 1, rnd.Next(27) + 1);
      item.IntValue1 = (int)rnd.Next();

      item.StringValue1 = string.Format("TestItem{0}", rnd.Next(100));

      if (refineaction != null)
        refineaction(item);
      return item;
    }
Пример #4
0
    public void TestWaitExtensionMethod()
    {
      var denso = Session.New;

      var item = new TestDataModel();

      item.DateValue1 = new DateTime(1975, 02, 13);
      item.IntValue1 = 99;
      item.StringValue1 = "jdasljdlas";

      denso.Set(item).Wait();
      denso.Flush<TestDataModel>().Wait();

      Assert.AreEqual(0, denso.Count<TestDataModel>());

    }