示例#1
0
        public void GenerateGetAllQuery_ProperTableName_Valid()
        {
            // Arrange
            var generator = new MySqlQueryGenerator <HeapEntity>("Users");

            // Act
            var selectQuery = generator.GenerateGetAllQuery();

            // Assert
            Assert.Equal($"SELECT Users.Username, Users.Password FROM Users;", selectQuery);
        }
示例#2
0
        public void GenerateGetAllQuery_CustomColumnNames_Valid()
        {
            // Arrange
            var generator = new MySqlQueryGenerator <CustomColumnNamesEntity>("Orders");

            // Act
            var selectQuery = generator.GenerateGetAllQuery();

            // Assert
            Assert.Equal($"SELECT Orders.OrderId AS Id, Orders.DateCreated AS Date FROM Orders;", selectQuery);
        }