public void Should_Be_Able_To_Run_Query() { //Arrange var sessionFactory = TastFactory.CreateSessionFactory(); var target = new DataContext(sessionFactory.OpenSession()); //Act var result = new FindFoo().Execute(target).ToList(); //Assert Assert.IsTrue(result.Any()); }
public void ShouldReturnAnUpdatedObject() { //Arrange var sessionFactory = TastFactory.CreateSessionFactory(); var target = new DataContext(sessionFactory.OpenSession()); //Act var item = new Foo(); target.Add(item); target.Commit(); //Assert Assert.IsNotNull(item.Id); Assert.AreNotEqual(default(int), item.Id); Console.WriteLine(item.Id); }