public void CreateQuery() { string sql = _faker.Random.AlphaNumeric(30); int commandTimeout = _faker.Random.Int(); bool shouldBePrepared = _faker.Random.Bool(); CommandType type = _faker.PickRandom <CommandType>(); List <CustomDbParameter> parameters = new List <CustomDbParameter>() { new CustomDbParameter() { ParameterName = "@Param3" }, new CustomDbParameter() { ParameterName = "@Param2" }, new CustomDbParameter() { ParameterName = "@Param1" } }; ISqlQuery query = QueryFactory.CreateSQLQuery(sql, type, parameters, commandTimeout, shouldBePrepared); Assert.IsNotNull(query); Assert.AreEqual(commandTimeout, query.CommandTimeout); Assert.AreEqual(sql, query.QueryText); Assert.AreEqual(shouldBePrepared, query.ShouldBePrepared); Assert.AreEqual(query.Parameters.Count(), parameters.Count); Assert.AreEqual(type, query.QueryType); }