Skip to content

Commit

Permalink
adding a TestSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
giriharan13 committed Sep 24, 2023
1 parent 342cd21 commit 053b32a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ public static Object[] testAddValues() {
public void testAdd() {
assertEquals(expected,su.addString(s1, s2));
}

}
30 changes: 30 additions & 0 deletions junit-4-basics/src/test/java/com/giriharan/StringUtilsTest1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.giriharan;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class StringUtilsTest1 {

StringUtils su;

@Before
public void init()
{
su = new StringUtils();
}

@Test
public void testAdd() {
assertEquals("HELLO WORLD!", su.addString("HELLO", " WORLD!"));
}


@Test
public void testCountVowels()
{
assertEquals(5, su.countVowels("aeiou"));
}

}
14 changes: 14 additions & 0 deletions junit-4-basics/src/test/java/com/giriharan/TestSuiteDemo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.giriharan;

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses(value= {StringUtilsParamTest.class,StringUtilsTest1.class})
public class TestSuiteDemo {

}

0 comments on commit 053b32a

Please sign in to comment.