summaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/PropertiesAssignmentVerificator.java
blob: fa68f4123d5418e309bcfdb3e5be5269e99c3e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.openecomp.sdc.ci.tests.verificator;

import static org.testng.Assert.assertTrue;

import org.openecomp.sdc.ci.tests.execute.setup.SetupCDTest;
import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;

import com.aventstack.extentreports.Status;

public class PropertiesAssignmentVerificator {
	
	public static void validateFilteredPropertiesCount(int propertiesCount, String propertyLocation){
		int actualPropertiesCount = GeneralUIUtils.getWebElementsListByContainsClassName(propertyLocation).size();
		SetupCDTest.getExtendTest().log(Status.INFO, String.format("Validating. Expected properties count: %s , Actual: %s", propertiesCount, actualPropertiesCount));
		String errMsg = String.format("Properties amount not as expected, expected: %s ,Actual: %s", propertiesCount, actualPropertiesCount);
		assertTrue(actualPropertiesCount == propertiesCount, errMsg);
	}
}