public void TestEntitiesCompletion() { Configuration cfg = CreateCfg(); HQLCodeAssist assist = new HQLCodeAssist( new SimpleConfigurationProvider(cfg)); assist.CodeComplete("from ", 5, this); Assert.That(proposals.Count == 4); }
public void TestCompleteShouldEmitNothing() { HQLCodeAssist assist = new HQLCodeAssist(null); assist.CodeComplete("from xxxxxx e where e.", 22, this); Assert.That(proposals.Count == 0); }
public void TestCompleteWhere() { HQLCodeAssist assist = new HQLCodeAssist(null); assist.CodeComplete("from xxxxxx e where ", 20, this); Assert.That(proposals.Any(q=>q.SimpleName=="e")); }
public void TestBeginToWriteHQL() { HQLCodeAssist assist = new HQLCodeAssist(null); assist.CodeComplete("", 0, this); }
public void TestCompleteIn() { HQLCodeAssist assist = new HQLCodeAssist(null); assist.CodeComplete("from xxxxxx e where e.id in ( select id from other x where )", 59, this); Assert.That(proposals.Any(q => q.SimpleName == "x")); }
public void WhenImportsDoesNotContainEntityNameThenNotThrow() { HQLCodeAssist assist = new HQLCodeAssist(new EmptyConfiguratorProvider()); assist.CodeComplete("from xxxxxx e where ", 20, this); Assert.That(proposals.Any(q => q.SimpleName == "e")); }
public void TestWherePropertyCompletion() { Configuration cfg = CreateCfg(); HQLCodeAssist assist = new HQLCodeAssist( new SimpleConfigurationProvider(cfg)); assist.CodeComplete("from MyEntity x where x.", 24, this); Assert.That(proposals.Count == 5); }
public void TestSelectPropertyCompletion() { Configuration cfg = CreateCfg(); HQLCodeAssist assist = new HQLCodeAssist( new SimpleConfigurationProvider(cfg)); assist.CodeComplete("select x. from MyEntity x", 9, this); Assert.That(proposals.Count == 5); }
public void TestSelectManyToOneCompletion() { Configuration cfg = CreateCfg(); HQLCodeAssist assist = new HQLCodeAssist( new SimpleConfigurationProvider(cfg)); assist.CodeComplete("select x.Referenced. from MyEntity x", 20, this); Assert.That(proposals.Count == 3); }
public void TestNestedPropertyCompletion() { Configuration cfg = CreateCfg(); HQLCodeAssist assist = new HQLCodeAssist( new SimpleConfigurationProvider(cfg)); assist.CodeComplete("from MyEntity x where x in ( select y. from Referenced y)", 38, this); Assert.That(proposals.Count == 3); }