{"id":17694750,"url":"https://github.com/avojak/swt-unit","last_synced_at":"2025-08-10T12:32:16.747Z","repository":{"id":74884677,"uuid":"89309054","full_name":"avojak/swt-unit","owner":"avojak","description":"SWT unit testing utilities","archived":true,"fork":false,"pushed_at":"2019-04-06T16:10:52.000Z","size":44,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-02T05:30:32.101Z","etag":null,"topics":["java","junit","swt","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avojak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-25T02:36:37.000Z","updated_at":"2024-12-18T05:11:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6a1189e-8ac6-41b9-947a-8e0f1ced5c0a","html_url":"https://github.com/avojak/swt-unit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/avojak/swt-unit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Fswt-unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Fswt-unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Fswt-unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Fswt-unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avojak","download_url":"https://codeload.github.com/avojak/swt-unit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Fswt-unit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269724770,"owners_count":24465151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","junit","swt","unit-testing"],"created_at":"2024-10-24T13:49:36.892Z","updated_at":"2025-08-10T12:32:16.462Z","avatar_url":"https://github.com/avojak.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swt-unit\n\n[![Build Status](https://travis-ci.org/avojak/swt-unit.svg?branch=1.0)](https://travis-ci.org/avojak/swt-unit) [![Coverage Status](https://coveralls.io/repos/github/avojak/swt-unit/badge.svg?branch=1.0)](https://coveralls.io/github/avojak/swt-unit?branch=1.0) [![License: GPL v3](https://img.shields.io/badge/license-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![Version](https://img.shields.io/badge/version-1.0-blue.svg)](http://repo.thedesertmonk.com/artifactory/webapp/#/artifacts/browse/tree/General/maven-release/com/thedesertmonk/util/swt-unit/1.0)\n\nGenerally I try to avoid directly testing [SWT](https://www.eclipse.org/swt/) controls, however there are times where it is useful to verify their state. The aim of this project is to provide utilities which facilitate unit tests around SWT widgets and controls.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nIt is expected that the appropriate SWT .jar be present at runtime.\n\n### Installing\n\nThe artifact may be pulled into a Maven project via the `pom.xml` file. \n\n*Note: swt-unit is a testing utility and therefore should be specified with the `test` scope*.\n\n#### Release Versions (Recommended)\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.thedesertmonk.util\u003c/groupId\u003e\n  \u003cartifactId\u003eswt-unit\u003c/artifactId\u003e\n  \u003cversion\u003e1.0\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n```xml\n\u003crepository\u003e\n  \u003cid\u003ethedesertmonk-release\u003c/id\u003e\n  \u003cname\u003eTheDesertMonk Maven Release Repository\u003c/name\u003e\n  \u003curl\u003ehttp://repo.thedesertmonk.com/maven-release\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n#### Snapshot Versions\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.thedesertmonk.util\u003c/groupId\u003e\n  \u003cartifactId\u003eswt-unit\u003c/artifactId\u003e\n  \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n```xml\n\u003crepository\u003e\n  \u003cid\u003ethedesertmonk-snapshot\u003c/id\u003e\n  \u003cname\u003eTheDesertMonk Maven Snapshot Repository\u003c/name\u003e\n  \u003curl\u003ehttp://repo.thedesertmonk.com/maven-snapshot\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n## Example Usage\n\n### `WidgetHierarchyInspector`\n\nThe `WidgetHierarchyInspector` will enumerate the child `Control` objects of a given a parent `Composite`. \n\nSuppose you have the following hierarchy:\n\n```java\nShell s = new Shell(display);\nComposite c = new Composite(s, SWT.NONE);\nScrolledComposite sc = new ScrolledComposite(s, SWT.V_SCROLL);\nButton b = new Button(s, SWT.PUSH);\n```\n\nThe `getChildren(Composite, Class)` method will behave as follows:\n\n```java\n// A List containing a single element: b\nList\u003cButton\u003e children = WidgetHierarchyInspector.getChildren(s, Button.class);\n```\n```java\n// A List containing a single element: sc\nList\u003cScrolledComposite\u003e children = WidgetHierarchyInspector.getChildren(s, ScrolledComposite.class);\n```\n```java\n// A List containing two elements: s and sc (ScrolledComposite is a subclass of Composite)\nList\u003cComposite\u003e children = WidgetHierarchyInspector.getChildren(s, Composite.class);\n```\n```java\n// An empty List\nList\u003cLabel\u003e children = WidgetHierarchyInspector.getChildren(s, Label.class);\n```\n\n## Running the tests\n\nThe [JUnit](http://junit.org/junit4/) tests can be run via the following Maven command:\n\n```\nman clean verify\n```\n\n## Built With\n\n* [Maven](https://maven.apache.org/) - Dependency Management\n* [Travis CI](https://travis-ci.org) - Continuous Integration and Deployment\n* [JaCoCo](http://www.eclemma.org/jacoco/) - Code Coverage\n\n## Versioning\n\nI use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/avojak/swt-unit/tags).\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0  - see the [LICENSE.md](LICENSE.md) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favojak%2Fswt-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favojak%2Fswt-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favojak%2Fswt-unit/lists"}