Skip to content

Instantly share code, notes, and snippets.

@looselytyped
Last active September 29, 2025 17:02
Show Gist options
  • Select an option

  • Save looselytyped/9a6545a3f11bb094aacdc72e8eeadd74 to your computer and use it in GitHub Desktop.

Select an option

Save looselytyped/9a6545a3f11bb094aacdc72e8eeadd74 to your computer and use it in GitHub Desktop.

Exercise 1

Prompt to ChatGPT

Given this pseudo-code generate generate a java test in ArchUnit

DESCRIPTION Define Testing Domain  
DEFINE SYSTEM Make the Grade AS mtg  
  DEFINE DOMAIN Testing AS testing  
    DEFINE COMPONENT Student Sign-in AS signin  
    DEFINE COMPONENT Test Loader AS loader  
    DEFINE COMPONENT Question Sender AS question_sender  
    DEFINE COMPONENT Answer Capture AS answer_capture  
ASSERT(CLASSES are only CONTAINED within COMPONENTS and SUBDOMAINS)  

With Constraints


DESCRIPTION Define Testing Domain
DEFINE SYSTEM Make the Grade AS mtg
  DEFINE DOMAIN Testing AS testing
    DEFINE COMPONENT Student Sign-in AS signin
    DEFINE COMPONENT Test Loader AS loader
    DEFINE COMPONENT Question Sender AS question_sender
    DEFINE COMPONENT Answer Capture AS answer_capture
ASSERT(CLASSES are only CONTAINED within COMPONENTS and SUBDOMAINS)
ASSERT(loader has DEPENDENCY on question_sender)
ASSERT(there are no other dependencies)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment