Maverick Lasa

Greenhorn
+ Follow
since Oct 18, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Maverick Lasa

i changed the port of the httpconnector handler in the web.xml from the default value of 8080 to 4444. however, i noticed that the application's working folder (default to work) has the sub-folders named as localhost_8080. i was wondering since i set the port value to 4444, these folders where the compiled jsp classes are placed will be named localhost_4444, shouldn't it be that way?
19 years ago
Hello Billy,
Thanks. I had just tried experimenting with it.
I thought that when a TestSetup is introduced
the setUp/tearDown methods won't be called anymore
before/after each test methods.
Thanks a lot anyway,
mave
20 years ago
Hello guys,
I had been searching for a code snippet on how to do this in JUnit framework.
In a normal testcase, the test is run in the following manner.
setUp -> testMethod1 -> tearDown
setUp -> testMethod2 -> tearDown
Now, I need to startup a fixture once for all the testmethods
and I had overriden the setUp/tearDown method in the TestSetup.
Now my testcase is ran as
setUp -> testMethod1 -> testMethod2 -> tearDown
However, I want to have this kind of behavior in my code.
startFixture (executed only once)
setUp -> testMethod1 -> tearDown
setUp -> testMethod2 -> tearDown
stopFixture
Having a flag in the setup will be an easy one but I want know a kinda "official" way on how JUnit framework could be used. Or do I have to implement my TestListener for this?
There might have been the same question as this in the forum; if there is, could you please give me the link to it...
Thanks,
mavedrive;
20 years ago
hello simon,
properties file is merely a text file. you can edit using
any text editor. you may assign your default text editor
to .properties extension thus you don't have to change the
file extensions in order to open them on text editors.
mavedrive;
20 years ago
i always use the following to find where my program is executed.

mavedrive
20 years ago
use ant. it has a jar task which you could exclude/include specific
file patterns.
hope this help.
mavedrive;
20 years ago
I was in the same situation as you are now i.e. updating all the testcases
to reflect the expected values. Are your expected values/results hard-coded
in your testcase? If it is, it better to remove them. Create a kind of a
ResultManager class that would generate the same expected result (for the specified parameters) that would be the output of your testcase. With this, you don't have to update all of the testcases; you might just need to update one class - ResultManager class to reflect whatever changes that might had been changed in the implementation of the function you are testing...
mavedrive;
20 years ago
I suggest that you better create your own TestRunner equipped with the
reporting functions you needed. I was looking for the same tools before
but couldn't find one, so I created my own test runner that would write
reports in several formats(html, xml, txt,csv) as well as keep the data
into a database... For your test measurements, you could as well introduce
it into your runner. It's not that hard anyway...:-)
mavedrive;
20 years ago




Hello Gerald,
The condition n==base compares the reference of the BigInteger instances and NOT their values, thus this condition is always FALSE as base and n refers to a different instances.
Try the following:

mavedrive;
20 years ago
I think the Java Reflection Tutorial will help you with this.
mavedrive;
20 years ago

Originally posted by dragon ji:
thanx,guys.
I am in trying....


Hello Ji,
Guess what I had found out!
See this page.
It has what you are looking for.
mavedrive;
20 years ago
Hello Ernest,
Thanks for the link! Great site.
Dragon Ji,
Wotsit has info on the format.
Writing a decoder in pure java
could be better.
mavedrive;
20 years ago
JNI
include the native library that comes with the jdk into your c project.
you could find it under <jdk_install_dir>\include.
mavedrive;
20 years ago
i never heard of an existing API for rar de/compression in java. i'm not sure either if the algorithm is available to public
here's a feasible workaround:
- get the native library e.g. UNRAR.DLL
- use JNI to call native methods
mavedrive;
20 years ago
this is a bit of browser dependent. you can use the GET request to retrieve a resource such a zip file. your browser automatically detects this and would prompt you with a Save As... dialog. This is however depends on the format of the file you are downloading. For plain files like txt files, your browser might try to display it rather than prompting you with a dialog.
mavedrive;
20 years ago