예제 #1
0
        public static void Reset_ClearsDictionary()
        {
            var repo = new BraveRepository(Factory);

            repo.GetKey <ITestSession>(1);
            var target = new SqlDialectHelper();

            target.Reset();
            var result = target.GetEntityState <Brave>();

            Assert.That(result.HasValue, Is.False);
        }
예제 #2
0
        public static void Query_Wont_MakeFrozen()
        {
            var connection = new TestSessionMemory(A.Fake <IDbFactory>());

            new MigrateDb(connection);
            var target = new SqlDialectHelper();

            target.Reset();
            OrmConfiguration.RegisterEntity <Brave>();
            connection.Query("SELECT * FROM Braves");
            var result = target.GetEntityState <Brave>();

            Assert.That(OrmConfiguration.GetDefaultEntityMapping <Brave>().IsFrozen, Is.False);
            Assert.That(result.HasValue, Is.False);
        }