Posts mit dem Label Java werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Java werden angezeigt. Alle Posts anzeigen

2020-03-20

Using Cucumber with Gradle with tags

I want to run Cucumber from Gradle with the possibility to specify tags. Here is a build.gradle to do this:


  • gradle cucumber - will run all cucumber scenarios but not these tagged with @Ignore
  • gradle cucumber -P tags=@Smoketest - will run all smoketests but again will ignore these with the tag @Ignore.

2014-03-30

Arduino 1.5 does not start on Java 7

After updating to OSX 10.9.2 Mavericks and also update to Java 7 64 bit the Arduino app does not start any longer.
$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

When I try to start it the icon flash up in the dock but nothing else happens. Further on no useful messages appears in log - just:
30.03.14 12:36:48,231 com.apple.launchd.peruser.501[279]: (cc.arduino.Arduino.86448[1902]) Exited with code: 1

To solve the problem I have to reinstall Java 1.6. An forum post in the Microchip forum give some further information about the installation.

2012-11-04

Infinitest with TestNG 6.8 support

Infinitest is an eclipse plugin which executes after editing files all corresponding unittests. After using infinitest for a while I realize that some features of TestNG 6.8 are not available by infinitest itself (in my case assertNotEquals). And therefor result in a reported problem.

Fortunately the project is availible on github and so I fork the project and change it to support TestNG 6.8. An pull request to the original project is waiting.

If you want to try it on your own risk - you can download it here. To install it in your Eclipse you have to unzip the file in the eclipse/dropins directory. I have test the version on Win7 and OSX with Eclipse 3.7 - and it seems to work ;-) 

2012-10-19

Unittest to verify that static method is called

.. using PowerMock, Mockito, TestNG

In example the class under test (cut) has a method showErrorMessage(msg). This method will call the static method JOptionPane.showMessageDialog(...) to show a error message.

I wrote a unittest to

  1. mock the showMessageDialog call - because otherwise the test will fail with an java.lang.VerifyError (UIManager is not initialized)
  2. verify that showMessageDialog is called + with the right parameter

2009-02-27

Maven2

Verzeichnisstruktur


An introduction to Maven 2
Building Web Applications with Maven 2

Projekt anlegen


C:\maven2example>mvn archetype:create
-DgroupId=com.attainware.maven2example
-DartifactId=maven2example_logic

2009-01-28

Java <=> Ruby

continue <=> next
throw <=> raise
catch <=> rescue
this <=> self
switch <=> case
case <=> when
default <=> else