Example #1
0
 public void NormallyInsertInteger()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new SimpleInteger { Value = 1 };
         repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });
     }
 }
Example #2
0
 public void NormallyInsertInteger()
 {
     using (var executionContext = new CommonTestExecutionContext())
     {
         var repository = new Common.DomRepository(executionContext);
         var entity = new SimpleInteger { Value = 1 };
         repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });
     }
 }
Example #3
0
 public void ShouldThowUserExceptionOnInsertInteger()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new SimpleInteger { Value = 3 };
         repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });
     }
 }
Example #4
0
 public void NormallyInsertInteger()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new SimpleInteger { Value = 3 };
         repository.TestMinValue.SimpleInteger.Insert(entity);
     }
 }
Example #5
0
 public void ShouldThowUserExceptionOnInsertInteger()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new SimpleInteger { Value = 1 };
         repository.TestMinValue.SimpleInteger.Insert(entity);
     }
 }
Example #6
0
 public void NullValue()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new SimpleInteger { ID = Guid.NewGuid(), Value = null };
         repository.TestMinValue.SimpleInteger.Insert(entity);
         Assert.IsNull(repository.TestMinValue.SimpleInteger.Filter(new[] { entity.ID }).Single().Value);
     }
 }
 public void NormallyInsertInteger()
 {
     using (var scope = TestScope.Create())
     {
         var repository = scope.Resolve <Common.DomRepository>();
         var entity     = new SimpleInteger {
             Value = 3
         };
         repository.TestMinValue.SimpleInteger.Insert(entity);
     }
 }
 public void ShouldThowUserExceptionOnInsertInteger()
 {
     using (var scope = TestScope.Create())
     {
         var repository = scope.Resolve <Common.DomRepository>();
         var entity     = new SimpleInteger {
             Value = 1
         };
         repository.TestMinValue.SimpleInteger.Insert(entity);
     }
 }
Example #9
0
        public void ShouldThowUserExceptionOnUpdate()
        {
            using (var container = new RhetosTestContainer())
            {
                var repository = container.Resolve<Common.DomRepository>();
                var entity = new SimpleInteger { Value = 10 };
                repository.TestMinValue.SimpleInteger.Insert(entity);

                entity.Value = 1;
                repository.TestMinValue.SimpleInteger.Update(entity);
            }
        }
 public void NullValue()
 {
     using (var scope = TestScope.Create())
     {
         var repository = scope.Resolve <Common.DomRepository>();
         var entity     = new SimpleInteger {
             ID = Guid.NewGuid(), Value = null
         };
         repository.TestMinValue.SimpleInteger.Insert(entity);
         Assert.IsNull(repository.TestMinValue.SimpleInteger.Load(new[] { entity.ID }).Single().Value);
     }
 }
Example #11
0
        public void ShouldThowUserExceptionOnUpdate()
        {
            using (var container = new RhetosTestContainer())
            {
                var repository = container.Resolve <Common.DomRepository>();
                var entity     = new SimpleInteger {
                    Value = 1
                };
                repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });

                entity.Value = 10;
                repository.TestMaxValue.SimpleInteger.Update(new[] { entity });
            }
        }
        public void ShouldThowUserExceptionOnUpdate()
        {
            using (var scope = TestScope.Create())
            {
                var repository = scope.Resolve <Common.DomRepository>();
                var entity     = new SimpleInteger {
                    Value = 1
                };
                repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });

                entity.Value = 10;
                repository.TestMaxValue.SimpleInteger.Update(new[] { entity });
            }
        }
Example #13
0
    // Start is called before the first frame update
    void Start()
    {
        var si = new SimpleInteger {
            data = 1
        };
        DateTime start = DateTime.Now;

        for (int x = 0; x < 1000000; x += 1)
        {
            list_of_ints.RemoveAt(0);
            list_of_ints.Add(si);
        }

        DateTime end = DateTime.Now;

        Debug.Log("Insert at the end and remove at 0: " + (end.Ticks - start.Ticks).ToString());

        start = DateTime.Now;

        for (int x = 0; x < 1000000; x += 1)
        {
            queue_of_ints.Dequeue();
            queue_of_ints.Enqueue(si);
        }

        end = DateTime.Now;
        Debug.Log("Insert at the end and remove at 0: " + (end.Ticks - start.Ticks).ToString());


        start = DateTime.Now;
        foreach (var d in list_of_ints)
        {
            d.data += 1;
        }
        end = DateTime.Now;
        Debug.Log("Traverse: " + (end.Ticks - start.Ticks).ToString());


        start = DateTime.Now;
        foreach (var d in queue_of_ints)
        {
            d.data += 1;
        }
        end = DateTime.Now;
        Debug.Log("Traverse: " + (end.Ticks - start.Ticks).ToString());
    }
Example #14
0
 public void NullValue()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new SimpleInteger { ID = Guid.NewGuid(), Value = null };
         repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });
         Assert.IsNull(repository.TestMaxValue.SimpleInteger.Filter(new[] { entity.ID }).Single().Value);
     }
 }
Example #15
0
 public void NullValue()
 {
     using (var executionContext = new CommonTestExecutionContext())
     {
         var repository = new Common.DomRepository(executionContext);
         var entity = new SimpleInteger { ID = Guid.NewGuid(), Value = null };
         repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });
         Assert.IsNull(repository.TestMaxValue.SimpleInteger.Filter(new[] { entity.ID }).Single().Value);
     }
 }
Example #16
0
        public void ShouldThowUserExceptionOnUpdate()
        {
            using (var executionContext = new CommonTestExecutionContext())
            {
                var repository = new Common.DomRepository(executionContext);
                var entity = new SimpleInteger { Value = 1 };
                repository.TestMaxValue.SimpleInteger.Insert(new[] { entity });

                entity.Value = 10;
                repository.TestMaxValue.SimpleInteger.Update(new[] { entity });
            }
        }