Java 类org.testng.asserts.SoftAssert 实例源码

项目:ExtendNG    文件:OrderByGroupsTest.java   
@AfterClass
public void finalAssert(){
    SoftAssert softAssert = new SoftAssert();

    softAssert.assertTrue(orderOfExecution.contains("test1 wayToName"), "group 'first' was not grouped");
    softAssert.assertTrue(orderOfExecution.contains("originalName thisOne"), "group 'third' was not grouped");
    softAssert.assertTrue(orderOfExecution.contains("coveredByTests treatThisRight"), "group 'second' was not grouped");

    softAssert.assertAll();
}
项目:testng_samples    文件:AssertionsTest.java   
@Test
public void testSoftAssert() {
 SoftAssert s = new SoftAssert();
  s.assertEquals(2 * 2, 3, "Three");
  s.assertEquals(2 * 2, 5, "Five");
  s.assertAll();
}
项目:at.info-knowledge-base    文件:DynamicLocatorsTests.java   
@Test
public void selectCategoryAndTopic() {
    WebDriver driver = null;
    SoftAssert softAssert = new SoftAssert();

    try {
        driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
        driver.manage().window().maximize();

        driver.get("http://automated-testing.info");

        SamplePage samplePage = new SamplePage(driver)
                .selectCategoryByName("webdriver")
                .selectTopicByIndex(1);

        softAssert.assertEquals(samplePage.getCurrentCategory(), "webdriver", "Wrong category");
        softAssert.assertEquals(samplePage.getTopicCreator(), "val_ch", "Wrong topic starter");
        softAssert.assertAll();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        if (driver != null) {
            driver.quit();
        }
    }
}
项目:designmetrics    文件:EfferentCouplingBetweenPackagesTest.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:designmetrics    文件:EfferentCouplingDesignWizardTest.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:designmetrics    文件:EfferentCouplingTest.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:designmetrics    文件:EfferentCouplingMethodTest.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:designmetrics    文件:EfferentCouplingBetweenClassTest.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:designmetrics    文件:AfferentCouplingTest.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:designmetrics    文件:EfferentCouplingMethodTest2.java   
@BeforeMethod
public void startTest() {
     softAssert = new SoftAssert();
}
项目:Testy    文件:WebLocatorCssTest.java   
@BeforeMethod
public void start(){
    softAssert = new SoftAssert();
    generateCssSelector = WebLocatorConfig.isGenerateCssSelector();
    WebLocatorConfig.setGenerateCssSelector(true);
}