Exemplo n.º 1
0
        public void Test_Get_UserId_FirebirdSql()
        {
            DbConnectionStringBuilder builder = new DbConnectionStringBuilder()
            {
                ConnectionString = firebirdSqlConnectionString
            };
            object result = EFUtil.GetUserId(builder);

            Assert.AreEqual("SYSDBA", result.ToString());
        }
Exemplo n.º 2
0
        public void Test_Get_UserId_Sqlite()
        {
            DbConnectionStringBuilder builder = new DbConnectionStringBuilder()
            {
                ConnectionString = sqliteConnectionString
            };
            object result = EFUtil.GetUserId(builder);

            Assert.IsNull(result);
        }
Exemplo n.º 3
0
        public void Test_Get_UserId_PostgreSql()
        {
            DbConnectionStringBuilder builder = new DbConnectionStringBuilder()
            {
                ConnectionString = postgreSqlConnectionString
            };
            object result = EFUtil.GetUserId(builder);

            Assert.AreEqual("postgres", result.ToString());
        }
Exemplo n.º 4
0
        public void Test_Get_UserId_SqlServer()
        {
            DbConnectionStringBuilder builder = new DbConnectionStringBuilder()
            {
                ConnectionString = sqlServerConnectionString
            };
            object result = EFUtil.GetUserId(builder);

            Assert.AreEqual("myUsername", result.ToString());
        }