mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 03:58:34 +02:00
Registrant of a domain can never be null
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=122630609
This commit is contained in:
parent
68b75461db
commit
d2a66e9d1f
14 changed files with 43 additions and 396 deletions
|
@ -68,8 +68,6 @@ public class RdapJsonFormatterTest {
|
|||
|
||||
private Registrar registrar;
|
||||
private DomainResource domainResourceFull;
|
||||
private DomainResource domainResourceNoRegistrant;
|
||||
private DomainResource domainResourceNoContacts;
|
||||
private DomainResource domainResourceNoNameservers;
|
||||
private HostResource hostResourceIpv4;
|
||||
private HostResource hostResourceIpv6;
|
||||
|
@ -131,24 +129,6 @@ public class RdapJsonFormatterTest {
|
|||
hostResourceIpv4,
|
||||
hostResourceIpv6,
|
||||
registrar));
|
||||
domainResourceNoRegistrant = persistResource(
|
||||
makeDomainResource(
|
||||
"dog.みんな",
|
||||
null,
|
||||
contactResourceAdmin,
|
||||
contactResourceTech,
|
||||
hostResourceBoth,
|
||||
hostResourceNoAddresses,
|
||||
registrar));
|
||||
domainResourceNoContacts = persistResource(
|
||||
makeDomainResource(
|
||||
"bird.みんな",
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
hostResourceIpv4,
|
||||
hostResourceIpv6,
|
||||
registrar));
|
||||
domainResourceNoNameservers = persistResource(
|
||||
makeDomainResource(
|
||||
"fish.みんな",
|
||||
|
@ -167,20 +147,6 @@ public class RdapJsonFormatterTest {
|
|||
Period.create(1, Period.Unit.YEARS),
|
||||
"created",
|
||||
clock.nowUtc()));
|
||||
persistResource(
|
||||
makeHistoryEntry(
|
||||
domainResourceNoRegistrant,
|
||||
HistoryEntry.Type.DOMAIN_CREATE,
|
||||
Period.create(1, Period.Unit.YEARS),
|
||||
"created",
|
||||
clock.nowUtc()));
|
||||
persistResource(
|
||||
makeHistoryEntry(
|
||||
domainResourceNoContacts,
|
||||
HistoryEntry.Type.DOMAIN_CREATE,
|
||||
Period.create(1, Period.Unit.YEARS),
|
||||
"created",
|
||||
clock.nowUtc()));
|
||||
persistResource(
|
||||
makeHistoryEntry(
|
||||
domainResourceNoNameservers,
|
||||
|
@ -339,22 +305,6 @@ public class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_domain_full.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomain_noRegistrant() throws Exception {
|
||||
assertThat(
|
||||
RdapJsonFormatter.makeRdapJsonForDomain(
|
||||
domainResourceNoRegistrant, false, LINK_BASE, WHOIS_SERVER))
|
||||
.isEqualTo(loadJson("rdapjson_domain_no_registrant.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomain_noContacts() throws Exception {
|
||||
assertThat(
|
||||
RdapJsonFormatter.makeRdapJsonForDomain(
|
||||
domainResourceNoContacts, false, LINK_BASE, WHOIS_SERVER))
|
||||
.isEqualTo(loadJson("rdapjson_domain_no_contacts.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomain_noNameservers() throws Exception {
|
||||
assertThat(
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
{
|
||||
"objectClassName" : "domain",
|
||||
"handle" : "12-Q9JYB4C",
|
||||
"ldhName" : "bird.xn--q9jyb4c",
|
||||
"unicodeName" : "bird.みんな",
|
||||
"status" :
|
||||
[
|
||||
"delete prohibited",
|
||||
"renew prohibited",
|
||||
"transfer prohibited",
|
||||
"update prohibited"
|
||||
],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/domain/bird.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/domain/bird.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "expiration",
|
||||
"eventDate": "2110-10-08T00:44:59.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last changed",
|
||||
"eventDate": "2009-05-29T20:13:00.000Z"
|
||||
}
|
||||
],
|
||||
"nameservers" :
|
||||
[
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "8-ROID",
|
||||
"ldhName" : "ns1.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns1.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/nameserver/ns1.cat.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/nameserver/ns1.cat.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"ipAddresses" :
|
||||
{
|
||||
"v4" : ["1.2.3.4"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "A-ROID",
|
||||
"ldhName" : "ns2.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns2.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/nameserver/ns2.cat.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/nameserver/ns2.cat.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1998-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"ipAddresses" :
|
||||
{
|
||||
"v6" : ["bad:f00d:cafe::15:beef"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"objectClassName" : "domain",
|
||||
"handle" : "13-Q9JYB4C",
|
||||
"handle" : "11-Q9JYB4C",
|
||||
"ldhName" : "fish.xn--q9jyb4c",
|
||||
"unicodeName" : "fish.みんな",
|
||||
"status" :
|
||||
|
|
|
@ -1,185 +0,0 @@
|
|||
{
|
||||
"objectClassName" : "domain",
|
||||
"handle" : "11-Q9JYB4C",
|
||||
"ldhName" : "dog.xn--q9jyb4c",
|
||||
"unicodeName" : "dog.みんな",
|
||||
"status" :
|
||||
[
|
||||
"delete prohibited",
|
||||
"renew prohibited",
|
||||
"transfer prohibited",
|
||||
"update prohibited"
|
||||
],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/domain/dog.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/domain/dog.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "expiration",
|
||||
"eventDate": "2110-10-08T00:44:59.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last changed",
|
||||
"eventDate": "2009-05-29T20:13:00.000Z"
|
||||
}
|
||||
],
|
||||
"nameservers" :
|
||||
[
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "C-ROID",
|
||||
"ldhName" : "ns3.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns3.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/nameserver/ns3.cat.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/nameserver/ns3.cat.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1997-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"ipAddresses" :
|
||||
{
|
||||
"v4" : ["1.2.3.4"]
|
||||
"v6" : ["bad:f00d:cafe::15:beef"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "E-ROID",
|
||||
"ldhName" : "ns4.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns4.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1996-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/nameserver/ns4.cat.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/nameserver/ns4.cat.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"entities" :
|
||||
[
|
||||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "4-ROID",
|
||||
"status" : ["active"],
|
||||
"roles" : ["administrative"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/entity/4-ROID",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/entity/4-ROID",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1998-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"vcardArray" :
|
||||
[
|
||||
"vcard",
|
||||
[
|
||||
["version", {}, "text", "4.0"],
|
||||
["fn", {}, "text", "Santa Claus"],
|
||||
["org", {}, "text", "GOOGLE INCORPORATED <script>"],
|
||||
["adr", {}, "text", [
|
||||
"",
|
||||
"",
|
||||
[
|
||||
"Santa Claus Tower",
|
||||
"41st floor",
|
||||
"Suite みんな"
|
||||
],
|
||||
"KOKOMO",
|
||||
"BM",
|
||||
"31337",
|
||||
"United States"]],
|
||||
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
|
||||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"]
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "6-ROID",
|
||||
"status" : ["active"],
|
||||
"roles" : ["technical"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.google.com/entity/6-ROID",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.google.com/entity/6-ROID",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1997-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"vcardArray" :
|
||||
[
|
||||
"vcard",
|
||||
[
|
||||
["version", {}, "text", "4.0"],
|
||||
["fn", {}, "text", "The Raven"],
|
||||
["org", {}, "text", "GOOGLE INCORPORATED <script>"],
|
||||
["adr", {}, "text", [
|
||||
"",
|
||||
"",
|
||||
[
|
||||
"Chamber Door",
|
||||
"upper level"
|
||||
],
|
||||
"KOKOMO",
|
||||
"BM",
|
||||
"31337",
|
||||
"United States"]],
|
||||
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
|
||||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "bog@cat.みんな"]
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue