Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8198
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.glorb.com!postnews.google.com!1g2000vbu.googlegroups.com!not-for-mail |
|---|---|
| From | mike <mikaelpetterson@hotmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Check of java annotation data |
| Date | Thu, 22 Sep 2011 04:49:28 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 55 |
| Message-ID | <713a419e-c152-482e-a0af-68ba487acd4d@1g2000vbu.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 194.237.142.20 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1316692269 25703 127.0.0.1 (22 Sep 2011 11:51:09 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Thu, 22 Sep 2011 11:51:09 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | 1g2000vbu.googlegroups.com; posting-host=194.237.142.20; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | HUALESRCNK |
| X-HTTP-UserAgent | Mozilla/5.0 (Windows NT 6.0; rv:6.0.2) Gecko/20100101 Firefox/6.0.2,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8198 |
Show key headers only | View raw
Hi,
Today we have an annotation for each test called Info. I need to check
this information. Information is different depending if it is a
create, get, set, update operation.
@Info(
time = Time.ISO9600,
attr = {
AREA,
SERVICE,
ROUTING,
}, type = TestCaseType.CREATE, positive = false,
description = ""
)
Then I have a testsummary class that access to all this information
for each test case using a HashMap containing "TestCaseName",Info.
<String, Info>
What I want to do is to check information in @Info -tag depending if
it is a create, get, set, update test case type.
The idea I have is to have an abstract base class like:
public abstract AbstractInfoChecker{
public abstract boolean checkInfo(Info info);
}
and impl classes for each operation tests:
public class Create extends AbstractInfoChecker{
public boolean checkInfo(Info info){
if(info.time().equalsIngoreCase("ISO9600"){
//check other
return true;
}
return false;
}
Q: How do a create an instance of right type depending on
TestCaseType.nnn e.g. CREATE --> instance of
Create.
I have my Info stored in testsummary like this: Info info =
(Info) entry.getValue();
I can access the different values Info object.
All comments and hints are much appreciated.
br,
//mike
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
Check of java annotation data mike <mikaelpetterson@hotmail.com> - 2011-09-22 04:49 -0700 Re: Check of java annotation data Robert Klemme <shortcutter@googlemail.com> - 2011-09-25 11:08 +0200
csiph-web