{"action":"created","issue":{"url":"https://api.github.com/repos/benas/random-beans/issues/281","repository_url":"https://api.github.com/repos/benas/random-beans","labels_url":"https://api.github.com/repos/benas/random-beans/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/benas/random-beans/issues/281/comments","events_url":"https://api.github.com/repos/benas/random-beans/issues/281/events","html_url":"https://github.com/benas/random-beans/issues/281","id":270903377,"number":281,"title":"[Feature request] generate random-beans-testbeans lib and upload to maven repository","user":{"login":"jiming","id":455978,"avatar_url":"https://avatars0.githubusercontent.com/u/455978?v=4","gravatar_id":"","url":"https://api.github.com/users/jiming","html_url":"https://github.com/jiming","followers_url":"https://api.github.com/users/jiming/followers","following_url":"https://api.github.com/users/jiming/following{/other_user}","gists_url":"https://api.github.com/users/jiming/gists{/gist_id}","starred_url":"https://api.github.com/users/jiming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiming/subscriptions","organizations_url":"https://api.github.com/users/jiming/orgs","repos_url":"https://api.github.com/users/jiming/repos","events_url":"https://api.github.com/users/jiming/events{/privacy}","received_events_url":"https://api.github.com/users/jiming/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-03T08:13:49Z","updated_at":"2017-11-07T03:34:16Z","closed_at":"2017-11-06T15:12:54Z","author_association":"NONE","body":"\r\nBecause writing unit test require some test beans. Each time writing a new bean is really a waste of time. The beans your defined (Address, Bar, Human, Mamals...) for unit test is quite good as a lib for this purpose.\r\n\r\n\r\nWhat about package them and upload to maven repository as well. Or simple move the test beans from `test` directory to `main` directory\r\n\r\nHave a nice day!"},"comment":{"url":"https://api.github.com/repos/benas/random-beans/issues/comments/342365630","html_url":"https://github.com/benas/random-beans/issues/281#issuecomment-342365630","issue_url":"https://api.github.com/repos/benas/random-beans/issues/281","id":342365630,"user":{"login":"jiming","id":455978,"avatar_url":"https://avatars0.githubusercontent.com/u/455978?v=4","gravatar_id":"","url":"https://api.github.com/users/jiming","html_url":"https://github.com/jiming","followers_url":"https://api.github.com/users/jiming/followers","following_url":"https://api.github.com/users/jiming/following{/other_user}","gists_url":"https://api.github.com/users/jiming/gists{/gist_id}","starred_url":"https://api.github.com/users/jiming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiming/subscriptions","organizations_url":"https://api.github.com/users/jiming/orgs","repos_url":"https://api.github.com/users/jiming/repos","events_url":"https://api.github.com/users/jiming/events{/privacy}","received_events_url":"https://api.github.com/users/jiming/received_events","type":"User","site_admin":false},"created_at":"2017-11-07T03:34:16Z","updated_at":"2017-11-07T03:34:16Z","author_association":"NONE","body":"Hi Mahmoud,\r\n\r\nYes, I wanted to use the beans in my unit test code. Of course, not in product environment.\r\n\r\nSome time when write a unit test, especially not business related code, I need define some POJO. Most time they can be any simple POJO, but I have to define them again and again. Which is a pain in the neck.\r\n\r\nFor example, I need test Collectors.toMap from jdk8\r\n\r\n```\r\n    @Test\r\n    public void test_toMap_withMerge() {\r\n\r\n        AtomicInteger counter = new AtomicInteger(1);\r\n        Stream<FakeName> objects = enhancedRandom.objects(FakeName.class, 4);\r\n        List<FakeName> fakeNames = objects.map(f -> {\r\n            f.setId(counter.getAndIncrement() % 3);\r\n            f.setFirst(String.valueOf(counter.get()));\r\n            return f;\r\n        }).collect(Collectors.toList());\r\n        fakeNames.forEach(f -> System.out.println(\">\" + f.getId() + \":\" + f.getFirst()));\r\n        Map<Integer, String> maps1 = fakeNames.stream().collect(Collectors.toMap(FakeName::getId, FakeName::getFirst, (s, s2) -> s));\r\n//        Map<Integer, String> maps = fakeNames.stream().collect(Collectors.toMap(FakeName::getId, FakeName::getFirst));\r\n//        List<FakeName> fakeNames = EnhancedRandom.randomListOf(3, FakeName.class);\r\n        System.out.println(maps1);\r\n\r\n        int[] a = {1, 2};\r\n        System.out.println(IntStream.of(a).average().toString());\r\n\r\n    }\r\n```\r\n\r\nThanks!\r\n\r\n"}}
{"actor":{"display_login":"jiming"}}