Skip to content

Commit

Permalink
make sure that there is an unsubmitted proposal in the FullExample
Browse files Browse the repository at this point in the history
  • Loading branch information
pahjbo committed Oct 31, 2024
1 parent ced86a9 commit 8acabbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/test/java/org/ivoa/dm/proposal/prop/FullExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public FullExample() {
SubmittedProposal submittedProposal = obs.submitProposal(clonedProposal);
obs.allocateProposal(submittedProposal);
model.addContent(obs.getCycle());
model.addReference(proposal); // add back the 'original' proposal
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/test/java/org/ivoa/dm/proposal/prop/FullExampleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import static org.junit.jupiter.api.Assertions.*;

import java.util.List;

import org.ivoa.dm.proposal.management.ProposalCycle;
import org.ivoa.dm.proposal.management.ProposalManagementModel;
import org.ivoa.vodml.testing.AutoDBRoundTripTest;
Expand Down Expand Up @@ -84,7 +86,9 @@ public ProposalManagementModel createModel() {
*/
@Override
public void testModel(ProposalManagementModel m) {
//TODO some testing
List<ObservingProposal> props = m.getContent(ObservingProposal.class);
assertTrue(props.size() > 0);
assertTrue(props.stream().filter(p -> p.submitted ==null?true:!p.submitted).count()> 0, "at least one unsubmitted proposal");
}


Expand Down

0 comments on commit 8acabbb

Please sign in to comment.