//[Test] public void TestB() { GgsTeste cat = new GgsTeste(); cat.Nome = "Teste Insert 4"; var insert = new CommandInsertGenerator(cat).GetCommand(); NonQueryCommandsExecutor executor = new NonQueryCommandsExecutor(cat); executor.Execute(); var novaCategoria = Joke.Query<GgsTeste>() .Where("nome ILIKE 'Teste%4'") .Execute()[0]; Assert.That(novaCategoria.Id, Is.EqualTo(23)); Assert.That(novaCategoria.Nome, Is.EqualTo("Teste Insert 4")); }
//[Test] public void TestC() { GgsTeste cat = new GgsTeste(); cat.Nome = "Gui"; Ags ags = new Ags(); ags.Nome = "Alana"; ags.Ggs = cat; NonQueryCommandsExecutor executor = new NonQueryCommandsExecutor(ags); executor.Execute(); var novaCategoria = Joke.Query<Ags>() .Where("ags.Ggs.Nome ILIKE 'Gui'") .Execute()[0]; Assert.That(novaCategoria.Id, Is.EqualTo(14)); Assert.That(novaCategoria.Nome, Is.EqualTo("Gui")); }