Skip to content

Commit

Permalink
Merge pull request #381 from dlsc-software-consulting-gmbh/feature/#380
Browse files Browse the repository at this point in the history
Added bluesky link to people and members
  • Loading branch information
FDelporte authored Nov 20, 2024
2 parents 66d3777 + cbe9247 commit 04b4afa
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 1 deletion.
2 changes: 2 additions & 0 deletions members/members.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"website": "https://www.dlsc.com",
"linkedIn": "dlemmermann",
"twitter": "dlemmermann",
"bluesky": "dlemmermann.bsky.social",
"gitHub": "dlemmermann",
"champion": true,
"rockstar": true,
Expand Down Expand Up @@ -63,6 +64,7 @@
"linkedIn": "frankdelporte",
"twitter": "frankdelporte",
"mastodon": "https://foojay.social/@frankdelporte",
"bluesky": "frankdelporte.bsky.social",
"gitHub": "fdelporte",
"champion": true,
"rockstar": false,
Expand Down
5 changes: 4 additions & 1 deletion people/people.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"blogId": "pixel-perfect",
"linkedIn": "dlemmermann",
"twitter": "dlemmermann",
"bluesky": "dlemmermann.bsky.social",
"champion": true,
"rockstar": true,
"id": "d.lemmermann",
Expand Down Expand Up @@ -150,6 +151,7 @@
"linkedIn": "frankdelporte",
"twitter": "FrankDelporte",
"mastodon": "https://foojay.social/@frankdelporte",
"bluesky": "frankdelporte.bsky.social",
"champion": true,
"rockstar": false,
"id": "f.delporte",
Expand Down Expand Up @@ -837,8 +839,9 @@
"website": "",
"gitHub": "CodeSimcoe",
"blogId": "",
"linkedIn": "cl%C3%A9ment-de-tastes-a19734120/",
"linkedIn": "clement-de-tastes",
"twitter": "cdetastes",
"bluesky": "cdetastes.bsky.social",
"champion": false,
"rockstar": false,
"id": "c.detastes",
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/dlsc/jfxcentral/data/model/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class Member extends ModelObject {
private String twitter;
private String gitHub;
private String mastodon;
private String bluesky;
private boolean champion;
private boolean rockstar;

Expand Down Expand Up @@ -71,6 +72,14 @@ public void setMastodon(String mastodon) {
this.mastodon = mastodon;
}

public String getBluesky() {
return bluesky;
}

public void setBluesky(String bluesky) {
this.bluesky = bluesky;
}

public boolean isChampion() {
return champion;
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/dlsc/jfxcentral/data/model/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class Person extends ModelObject {
private String twitter;
private String gitHub;
private String mastodon;
private String bluesky;
private boolean champion;
private boolean rockstar;

Expand Down Expand Up @@ -92,6 +93,14 @@ public void setMastodon(String mastodon) {
this.mastodon = mastodon;
}

public String getBluesky() {
return bluesky;
}

public void setBluesky(String bluesky) {
this.bluesky = bluesky;
}

public boolean isChampion() {
return champion;
}
Expand Down
52 changes: 52 additions & 0 deletions src/test/java/com/dlsc/jfxcentral/data/DataRepositoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.dlsc.jfxcentral.data.model.LearnRaspberryPi;
import com.dlsc.jfxcentral.data.model.Library;
import com.dlsc.jfxcentral.data.model.LibraryInfo;
import com.dlsc.jfxcentral.data.model.Member;
import com.dlsc.jfxcentral.data.model.Person;
import com.dlsc.jfxcentral.data.model.Post;
import com.dlsc.jfxcentral.data.model.RealWorldApp;
Expand Down Expand Up @@ -239,6 +240,23 @@ public void shouldLoadPersonMastodon() {
assertEquals("https://foojay.social/@frankdelporte", fd.get().getMastodon(), "mastodon link not loaded");
}

@Test
public void shouldLoadPersonBluesky() {
// given
DataRepository repository = DataRepository.getInstance();
repository.reload();

assertFalse(repository.getPeople().isEmpty());

// when
Optional<Person> fd = repository.getPeople().stream()
.filter(p -> p.getId().equals("f.delporte"))
.findFirst();

assertTrue(fd.isPresent());
assertEquals("frankdelporte.bsky.social", fd.get().getBluesky(), "bluesky link not loaded");
}

@Test
public void shouldLoadMemberDescription() {
// given
Expand All @@ -256,6 +274,40 @@ public void shouldLoadMemberDescription() {
});
}

@Test
public void shouldLoadMemberMastodon() {
// given
DataRepository repository = DataRepository.getInstance();
repository.reload();

assertFalse(repository.getMembers().isEmpty());

// when
Optional<Member> fd = repository.getMembers().stream()
.filter(m -> m.getId().equals("f.delporte"))
.findFirst();

assertTrue(fd.isPresent());
assertEquals("https://foojay.social/@frankdelporte", fd.get().getMastodon(), "mastodon link not loaded");
}

@Test
public void shouldLoadMemberBluesky() {
// given
DataRepository repository = DataRepository.getInstance();
repository.reload();

assertFalse(repository.getMembers().isEmpty());

// when
Optional<Member> fd = repository.getMembers().stream()
.filter(m -> m.getId().equals("f.delporte"))
.findFirst();

assertTrue(fd.isPresent());
assertEquals("frankdelporte.bsky.social", fd.get().getBluesky(), "bluesky link not loaded");
}

@Test
public void shouldLoadLinksOfTheWeek() {
// given
Expand Down

0 comments on commit 04b4afa

Please sign in to comment.