public void FaunaRepositoryDb_GetFaunaById() { FaunaRepositoryDb urd = new FaunaRepositoryDb(); var a = urd.GetFaunaById(1); Assert.IsNotNull(a); }
public void FaunaRepositoryDb_GetAllData() { FaunaRepositoryDb urd = new FaunaRepositoryDb(); int expectedCount = 3; int count = urd.Faunas.Count; Assert.AreSame(expectedCount, count, "Harusnya 3."); }
public void FaunaRepositoryDb_DeleteFauna() { FaunaRepositoryDb urd = new FaunaRepositoryDb(); urd.DeleteFauna(1); var a = urd.GetFaunaById(1); Assert.IsNull(a); }
public void FaunaRepositoryDb_UpdateFauna() { FaunaRepositoryDb urd = new FaunaRepositoryDb(); Fauna fauna = new Fauna() { FaunaName = "Njajal Gan", FaunaId = 1 }; urd.UpdateFauna(fauna); var a = urd.GetFaunaById(1); Assert.AreEqual(fauna, a); }
public void FaunaRepositoryDb_AddFauna() { FaunaRepositoryDb urd = new FaunaRepositoryDb(); Fauna fauna = new Fauna() { FaunaName = "Njajal Gan", FaunaId = 1000 }; urd.AddFauna(fauna); var a = urd.GetFaunaById(1000); Assert.IsNotNull(a); }