Пример #1
0
 public void test_method_11()
 {
     using (ISession unitTestSession = SampleDataTestContext.OpenSession())
     {
         Store store = new Store
         {
             testfield = "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz"
         };
         unitTestSession.Save(store);
         unitTestSession.Flush();
     }
 }
Пример #2
0
        public void test_method_2()
        {
            using (ISession unitTestSession = SampleDataTestContext.OpenSession())
            {
                Product product = new Product
                {
                    Name      = "P 1",
                    ProductId = 1,
                    store     = 1
                };
                unitTestSession.Save(product);
                unitTestSession.Flush();

                ProductObject productObject = new ProductObject(unitTestSession);
                var           productList   = productObject.ReadAll();

                Assert.AreEqual("P 1", productList[0].Name);
            }
        }