-
Notifications
You must be signed in to change notification settings - Fork 1
milesburton/grails-twitter-tdd-example
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# ✨ Mock Twitter Example: Standalone Grails Application for Learning 🌟 This repository contains a **standalone Grails application** designed as an educational tool. It uses a "Twitter" theme as an example to help students learn the basics of: - 🏗️ Building a Grails application. - 🧪 Writing unit and functional tests. - 🤖 Simulating external services with mock data. - 🌐 Creating fake endpoints for testing purposes. This example is **not connected to Twitter** or any external libraries like Twitter4J. It is purely a demonstration project for learning purposes. --- ## 🚀 Features - **Self-Contained Example**: No external dependencies or API keys are needed. - **Mock Services and Endpoints**: Examples of stubbing and faking external interactions. - **Testing Examples**: Includes pre-configured unit and functional tests using **Geb** and **Spock**. - **Educational Focus**: Designed to demonstrate Grails application structure and testing methodologies. --- ## 🛠️ Getting Started ### 📋 Prerequisites - **Grails Framework**: [Installation Guide](https://grails.org/download.html) - **Java Development Kit (JDK)**: Ensure compatibility with your Grails version. ### ⚙️ Setup Instructions 1. **Clone this repository**: ```bash git clone https://github.com/your-repository/mock-twitter-grails-example.git cd mock-twitter-grails-example ``` 2. **Install dependencies**: ```bash grails dependencies ``` 3. **Run the application**: ```bash grails run-app ``` > **Note**: No external API keys are required. This project is entirely self-contained. --- ## 🧪 Running Tests ### ✅ Unit Tests Run the unit tests to validate individual components: ```bash grails test-app -unit ``` ### 🌟 Functional Tests Run the functional tests to verify end-to-end workflows: ```bash grails test-app -functional ``` --- ## 🛠️ Code Highlights - 🤖 **Mock Services**: Demonstrates service stubbing for simulating external API calls (`src/test/groovy`). - 🌐 **Fake Endpoints**: Provides example controllers for simulating API behavior (`grails-app/controllers`). - 🌟 **Functional Tests with Geb**: Pre-configured functional tests located in `src/integration-test/groovy`. --- ## 📚 Notes for Students - This project is intended for **learning purposes only**. - The "Twitter" theme is used purely as a conceptual example. - Feel free to adapt the project to explore other themes or use cases. --- ## 🤝 Contributing Contributions are welcome! To contribute: 1. Fork the repository. 2. Create a new branch for your feature or bug fix. 3. Submit a pull request for review. --- ## 📜 License This project is licensed under the [MIT License](LICENSE). --- For any questions or support, feel free to reach out via the Issues tab. 💬
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published