SORU
15 NİSAN 2009, ÇARŞAMBA


Çalışan aynı JUnit test durumda farklı verilerle birden çok kez

Orada JUnit özel bir sınama durumu çalıştırın söylemek için herhangi bir şekilde farklı veri ile birden fazla kez sürekli bir sonraki test çalışmasına gitmeden önce var mı?

CEVAP
15 NİSAN 2009, ÇARŞAMBA


junit 4.4 theories bir göz atın:

import org.junit.Test;
import org.junit.experimental.theories.*;
import org.junit.runner.RunWith;

@RunWith(Theories.class)
public class PrimeTest {

    @Theory
    public void isPrime(int candidate) {
          // called with candidate=1, candidate=2, etc etc  
    }

    public static @DataPoints int[] candidates = {1, 2, 3, 4, 5};
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Alexander Johnson

    Alexander Jo

    26 Temmuz 2008
  • Austin Evans

    Austin Evans

    5 AĞUSTOS 2007
  • Nightmare2005

    Nightmare200

    14 Ocak 2007