Beispiel #1
0
 public void TestEntitiesCompletion()
 {
     Configuration cfg = CreateCfg();
     HQLCodeAssist assist = new HQLCodeAssist( new SimpleConfigurationProvider(cfg));
     assist.CodeComplete("from ", 5, this);
     Assert.That(proposals.Count == 4);
 }
Beispiel #2
0
 public void TestCompleteShouldEmitNothing()
 {
     HQLCodeAssist assist = new HQLCodeAssist(null);
     assist.CodeComplete("from xxxxxx e where e.", 22, this);
     Assert.That(proposals.Count == 0);
 }
Beispiel #3
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"));
 }
Beispiel #4
0
 public void TestBeginToWriteHQL()
 {
     HQLCodeAssist assist = new HQLCodeAssist(null);
     assist.CodeComplete("", 0, this);
 }
Beispiel #5
0
 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"));
 }
Beispiel #6
0
 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"));
 }
Beispiel #7
0
 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);
 }
Beispiel #8
0
 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);
 }
Beispiel #9
0
 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);
 }
Beispiel #10
0
 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);
 }