Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am converting some tests from Java to Kotlin. For Java tests I use AssertJ library which is very powerful and has rich set of assertions. My problem is that for Kotlin tests I can not use AssertJ and
Kotlin JUnit (org.jetbrains.kotlin:kotlin-test-junit) has very limited set of assertions.
Is there Kotlin equivalent for AssertJ or better way for asserts?
I found Kluent library but I'm still not sure if this is the best library to use.
There is no official equivalent but basic AssertJ is still usable in many cases and looks quite fine:
assertThat(info)
.containsKey("foo")
assertThatThrownBy { session.restTemplate.postForLocation("foo", {}) }
.isExactlyInstanceOf(HttpClientErrorException::class.java)
If you want dedicated wrappers, this early-stage project is trying to achieve this: https://github.com/wuan/assertj-core-kotlin
You are probably no longer searching for an assertion library but just in case you are not yet happy with your current choice, have a look at https://github.com/robstoll/atrium
It supports inter alia:
assertion groups
assertion functions for nullable types
property assertions
method assertions
postulate that a Throwable was thrown
As well as more advanced features such as sophisticated assertion builders, support for i18n and more.
The examples in the README will give you a nice overview:
https://github.com/robstoll/atrium/blob/master/README.md#examples
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have this homework where I should create an android application with a java compiler in it. the application i'm supposed to do is an educational application, with tutorials in it, my main problem is how to place a compiler in Unity. I've been searching the whole internet but can't seem to find what i need.
What do you mean by "place a compiler"? do you want to to use a compiled unity program that can compile java code or do you want to compile a unity project with java?
I think thats not a thing you can get a fast answer on how to do it.
If you have a functioning java compiler in whatever language you can bind to C# you for sure can compile java code with a c# application.
Edit:
And ofcourse its possible to write kind of a "java syntax string to c# parser" in c# on a really basic level yourself, if that is what you want.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there somewhat of a standard out there that people use to document their libraries and frameworks?
Ideally, it would make use of JSON or YAML and would allow for generation of HTML pages that present it nicely.
The most common approach to SDK documentation is to generate the docs from the comments in the source code. This way the class/function reference docs can be easily kept in sync with the implementation.
There are documentation generators for different programming languages and frameworks. Some tools let you combine the generated reference docs with manually written conceptual topics (overview, "getting started", etc.)
Some popular tools are:
.NET - Sandcastle
Example: Sandcastle docs
Java - Javadoc (part of JDK)
Example: Java API docs
JavaScript - jsdoc
Example: Adblock Plus JSDoc
Python - Sphinx, specifically sphinx-apidoc
Example: Python docs
Doxygen supports C/C++, Objective-C, C#, Java, PHP and some other languages
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there anything like Javadoc for documenting Fortran code? How does one document the API for the many functions they have so that they can find what they want more easily?
Not "standard", but I've used a program called "robodoc" that is able to work with Fortran.
Nowadays I believe Doxygen supports Fortran as well, which IMHO is a better tool than robodoc.
As janneb mentioned "robodoc" is clean, easy and hence useful. But you it will not analyze your program and you have to do everything yourself. On the other hand, Doxygen have incorporated the modern Fortran features(derived data types, type bound procedures, ... ) and just like C++ you can get an analysis of your program along with graphs etc.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Are the JavaDocs for clojure.lang, etc. available online? Do I need to build it myself from the Clojure source?
Thanks.
if you want descriptions for functions and even examples, visit ClojureDocs
you can even contribute ;)
Javadocs don't exist, per se. If you look at the Java source code, it's very sparsely documented. Certainly you could generate a skeleton yourself, but it probably wouldn't be all that useful anyway as much of the language is self-implemented (in clojure), using Java mostly for bootstrapping the core functionality. I don't think clojure.lang package is really intended to be used directly.
To learn about Clojure functions you can:
Use (doc) and (find-doc) from a repl
Use the API reference at clojure.org
See ClojureDocs, per #Belun's answer
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Where is the documentation for NUnit's mocking library, NUnit.Mocks?
I can't find anything in their official documentation or wiki.
As I have been told recently Nunit.Mocks are not meant to be used for serious applications. Given it's obvious limitations you're better off with a different framework anyway...
NUnit.Mocks was originally developed for internal use in NUnit's own
tests, although we no longer use it for that purpose.
In addition, it has been useful as a teaching tool, allowing users to
gain familiarity with mocking techniques before moving on to more
serious frameworks.
For production use, we recommend you install a full-featured mock
object framework.
The NUnit project now uses NSubstitute and NUnit.Mocks is no longer
being developed.
Source: NUnit.Mocks 2.6.2