jeudi 21 juillet 2016

Nunit method and class attribute declaration difference of [Test] and [Test()]

Hi i am doing automation with nunit. i got doubt.

[TestFixture()]
    public class LoginTest
    {
        [Test()]
        public void setup() 
        {
//setup code
        }
}






 [TestFixture]
        public class LoginTest
        {
            [Test]
            public void setup() 
            {
    //setup code
            }
    }

What is the difference between giving [Textfixture] and [textfixture()].

Both seems working. So which is the correct approach?

Aucun commentaire:

Enregistrer un commentaire