Comments (2)
I'd be more than happy to write some code for this, but I have a question: What's an acceptable style?
The first thing that comes to mind is copying the assertEquals() code, inverting it. But that's a ton of code. It's not difficult, it's just something to track.
The second thing - and the one that appeals most to me - is writing assertNotEquals in this mode:
assertNotEquals(object1, object2) {
try { assertEquals(object1, object2); } catch(AssertionFailure af) { fail(); }
}
What this does is obvious, but I don't know if using the exception mechanism that way is acceptable for the TestNG project.
I don't mind writing a patch, if the assertNotEquals() makes sense for everyone else, but I don't want to write a patch that's not acceptable.
from testng.
I just added these methods to the Assert class, can you try them? You can download the beta at http://testng.org/beta
I just copy/pasted the ones that someone just submitted to
http://jira.opensymphony.com/browse/TESTNG-266
Interesting timing between you and Patrick.
from testng.
Related Issues (20)
- Regression: @Ignore on method level doesn't work as expected HOT 5
- TestNG: java.lang.NoSuchMethodError: com.aventstack.extentreports.ExtentTest.assignCategory([Ljava/lang/String;)Lcom/aventstack/extentreports/ExtentTest; HOT 4
- Data Provider Threads configuration in the suite don't match the documentation HOT 3
- Injection errors with test classes annotated at class level that implement interfaces with default methods even when those use @NoInjection HOT 17
- testNG unknown host exception while connected to company VPN HOT 1
- Retried tests are counted towards the total test runs
- Retried tests are counted towards the total test runs
- Test run wrong order when use DependsOnGroups and Parallel by classes HOT 6
- Suite attributes map should be thread safe
- Downloading external sources is disabled TestNG.xml HOT 1
- Cascading suite xml's are not run from jar with -xmlpathinjar, only initial xml HOT 1
- Ability to mark a method as a testng step (Possible enhancement) HOT 1
- Spring Framework and ITestListener dependency injections HOT 5
- CVE-2022-4065 HOT 2
- Method predecessors lookup and/or method sorting is broken in certain inheritance and naming setups
- BeforeClass|AfterClass with inheritedGroups triggers cyclic dependencies
- ITestResult injected at @AfterMethod incorrect when a configuration method failed
- 6.1 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability HOT 1
- How to achieve test to be executed in particular order HOT 1
- Run TestNG group of tests first within a xml suite HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testng.