Mehmet Ethem SULAN :: Çevik Yazılım ile Javada Proje Geliştirme :: Agile Process and Test Development Driven Java Project
package TestEthemSulan;
import UyeKayitGerceklestirmeUyg.UyeKayitGerceklestirmeUyg;
import junit.framework.TestCase;
public class TestUyeKayitGerceklestirmeUyg extends TestCase {
  UyeKayitGerceklestirmeUyg obj;
  protected void setUp() throws Exception {
    super.setUp();
    obj=new UyeKayitGerceklestirmeUyg();
  }
//tc no 11 rakam ve email@email.com seklinde kontrol yaptigim icin basarisiz olur
//email adresinde en az bir tane @ ve . icermelidir ve tc no da sadece 11 rakam olmali
//yani veritabanina kayit gerceklestirmez
public void testUyeKayitEtmeBasarisiz(){
  String basarisiz="Kayit basarisiz";
assertEquals(basarisiz.trim(), obj.uyeKayitGerceklestir(
  "23452117", "ethem", "sulan", "dene@dene", "sulan"));
  }
//iki sefer ust uste bu test calistirilinca hata verirr.Cunku 
//tc no primary key secilmistir.
public void testUeKayitEtmeDogruGridiBasarili(){
  String basari="Basarili";
assertEquals(basari.trim(), obj.uyeKayitGerceklestir(
"13306778870", "ethem", "sulan", "ethemsulan@gmail.com", "ethem"));
  }
  protected void tearDown() throws Exception {
    super.tearDown();
  } }

Comments

There is one comment for this post.

  1. Susan on Nisan 2, 2012 2:24 pm

    You’ve impressed us all with that psontig!

Write a Comment

Let me know what you think?