private void EnsureLanguageExistsInDb(PlainLiteral node) { int hash = node.GetLanguage().GetHashCode(); MySqlCommand cmd = new MySqlCommand("INSERT IGNORE INTO Languages (hash, value) VALUES (" + hash + ", '" + node.GetLanguage() + "')", itsConn); cmd.ExecuteNonQuery(); }
public void languageDefaultsToNull() { PlainLiteral node = new PlainLiteral("whizz"); Assert.AreEqual(null, node.GetLanguage()); }
public void languageSpecifiedInConstructor() { PlainLiteral node = new PlainLiteral("whizz", "fr"); Assert.AreEqual("fr", node.GetLanguage()); }