Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Path assertions #158

Closed
SylvainJuge opened this issue Jan 24, 2014 · 7 comments
Closed

add Path assertions #158

SylvainJuge opened this issue Jan 24, 2014 · 7 comments
Milestone

Comments

@SylvainJuge
Copy link

The only file-related assertions I could find are for pre-java7 API, thus using the File class .

Allowing assertion (or create a new one) that allows to use Path would be useful, however that may break pre-java7 compatibility, thus requiring a dedicated module like "assertj-core-java7".

@joel-costigliola
Copy link
Member

Yes, for the time being AssertJ is java 6 compatible because a lot of projects still use java 6.

This issue could indeed be addressed in java 7 module that would provide all existing java 6 assertions and add new ones specific to java 7, users would then choose either assertj-core or assertj-core-java7 whether they use java 6 or 7.

As I see it, such a module would contain only java 7 assertions and provide java 6 assertions from classic assertj-core (probably by delegation). If such a solution is possible (I think it is but we need to try it to be sure), I'm ok to create the module. What I don't want here is to duplicate code because it would be a pain to maintain ... but I like the idea which is clearly in AssertJ philosophy that is providing assertions for the most used types.

@airborn
Copy link
Contributor

airborn commented Jul 4, 2014

+1 for the additional module

@JakeWharton
Copy link

Java 6 is EOL. If people want to use it on a Java 6 projects they can remain on an older version.

I'll +1 whatever gives me Path, etc. assertions. Being forced to the lowest-common denominator isn't a good long-term strategy. I'm surprised no one has brought up Java 8 types which I'm also missing.

@joel-costigliola joel-costigliola added this to the 2.0 milestone Nov 24, 2014
@joel-costigliola
Copy link
Member

I wanted to create a specific module for Java 7 but as Java 6 is EOL I will just upgrade the code to Java 7 in the next release (2.0.0), 1.7.x versions are the last versions based Java 6 .

Java 8 support is coming, we have a dedicated branch for that, issues are labeled with Java 8.

@JakeWharton
Copy link

Woo \o/. I'll try to take a look and help out where I can.

@davinkevin
Copy link

Very happy to see this element coming in my favorite assertion library !

@joel-costigliola
Copy link
Member

FYI, this issue is being addressed by #303.

@joel-costigliola joel-costigliola changed the title add file-related assertions for java7 file api add Path assertions Feb 6, 2015
scordio pushed a commit that referenced this issue Jul 29, 2022
Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 2.8.2 to 3.0.0.
- [Release notes](https://github.com/apache/maven-deploy-plugin/releases)
- [Commits](apache/maven-deploy-plugin@maven-deploy-plugin-2.8.2...maven-deploy-plugin-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-deploy-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants