private static void CreateBlog()
		{
			Blog blog = new Blog();

			blog.Author = "Henry";
			blog.Name = "Senseless";
			blog.Save();
		}
예제 #2
0
        public void Should_execute_formula()
        {
            ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
            Recreate();

            Post.DeleteAll();
            Blog.DeleteAll();

            Blog blog = new Blog();
            blog.Name = "hammett's blog";
            blog.Author = "hamilton verissimo";
            blog.Save();

            var blogs = Blog.FindAll();

            Assert.AreEqual(2, blogs[0].SomeFormula);
        }