public void RepositoryFileTest() { var target = new FileRepository(); var policia1 = Factoria <Policia> .Get(); policia1.Id = 4; target.Create(policia1); }
public void TestMethod1() { var targetPersona = Factoria <Persona> .Get(); var targetPolicia = Factoria <Policia> .Get(); Assert.IsInstanceOfType(targetPersona, typeof(Persona)); Assert.IsInstanceOfType(targetPolicia, typeof(Policia)); }
public void TestDelete() { var target = new MemoryRepository(); var persona = Factoria <Persona> .Get(); persona.Id = 1; target.Create(persona); var policia = Factoria <Policia> .Get(); policia.Id = 2; target.Create(policia); target.Delete(c => c.Id == 2); }
public void TestUpdate() { var target = new MemoryRepository(); var persona = Factoria <Persona> .Get(); persona.Id = 1; target.Create(persona); var policia = Factoria <Policia> .Get(); policia.Id = 2; target.Create(policia); policia.NumeroPlaca = 1234; var result = target.Update(policia); }
public void TestFind() { var target = new MemoryRepository(); var persona = Factoria <Persona> .Get(); persona.Id = 1; target.Create(persona); var policia = Factoria <Policia> .Get(); policia.Id = 2; target.Create(policia); var result = target.Find(c => c.Id == 2); Assert.AreEqual(2, result.Id); }