Return-Path: X-Original-To: apmail-creadur-commits-archive@www.apache.org Delivered-To: apmail-creadur-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 645CD10AD8 for ; Fri, 6 Dec 2013 19:11:09 +0000 (UTC) Received: (qmail 71933 invoked by uid 500); 6 Dec 2013 19:11:06 -0000 Delivered-To: apmail-creadur-commits-archive@creadur.apache.org Received: (qmail 71904 invoked by uid 500); 6 Dec 2013 19:11:06 -0000 Mailing-List: contact commits-help@creadur.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@creadur.apache.org Delivered-To: mailing list commits@creadur.apache.org Received: (qmail 71873 invoked by uid 99); 6 Dec 2013 19:11:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 19:11:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 19:11:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7BAD32388868; Fri, 6 Dec 2013 19:10:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1548670 - in /creadur/rat/branches/gsoc/apache-rat-api/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/ main/java/org/apache/rat/ main/java/org/apache/rat/api/ main/java/org/apache/rat/api/domain/ test/ test/java/ test/java/or... Date: Fri, 06 Dec 2013 19:10:44 -0000 To: commits@creadur.apache.org From: rdonkin@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131206191044.7BAD32388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rdonkin Date: Fri Dec 6 19:10:43 2013 New Revision: 1548670 URL: http://svn.apache.org/r1548670 Log: Start developing immutable license family bean with builder Added: creadur/rat/branches/gsoc/apache-rat-api/src/ creadur/rat/branches/gsoc/apache-rat-api/src/main/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java (with props) creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java (with props) creadur/rat/branches/gsoc/apache-rat-api/src/test/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/LicenseFamilyBuilderTest.java (with props) Added: creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java?rev=1548670&view=auto ============================================================================== --- creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java (added) +++ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java Fri Dec 6 19:10:43 2013 @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rat.api.domain; + +public final class LicenseFamily { + + private final String notes; + + public LicenseFamily(final String notes) { + super(); + this.notes = notes; + } + + public String getNotes() { + return this.notes; + } + +} Propchange: creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java ------------------------------------------------------------------------------ svn:eol-style = native Added: creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java?rev=1548670&view=auto ============================================================================== --- creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java (added) +++ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java Fri Dec 6 19:10:43 2013 @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rat.api.domain; + +public final class LicenseFamilyBuilder { + + public static LicenseFamilyBuilder aLicenseFamily() { + + return new LicenseFamilyBuilder(); + } + + private String notes; + + private LicenseFamilyBuilder() { + } + + public LicenseFamilyBuilder withNotes(final String notes) { + this.notes = notes; + return this; + } + + public LicenseFamily build() { + return new LicenseFamily(this.notes); + } +} Propchange: creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java ------------------------------------------------------------------------------ svn:eol-style = native Added: creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/LicenseFamilyBuilderTest.java URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/LicenseFamilyBuilderTest.java?rev=1548670&view=auto ============================================================================== --- creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/LicenseFamilyBuilderTest.java (added) +++ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/LicenseFamilyBuilderTest.java Fri Dec 6 19:10:43 2013 @@ -0,0 +1,38 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rat.api.domain; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +import org.junit.Test; + +public class LicenseFamilyBuilderTest { + + @Test + public void testWithNotes() { + final String someNotes = "Some notes"; + final LicenseFamily family = + LicenseFamilyBuilder.aLicenseFamily().withNotes(someNotes) + .build(); + assertNotNull("Builder should build", family); + assertThat(family.getNotes(), is(someNotes)); + } +} Propchange: creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/LicenseFamilyBuilderTest.java ------------------------------------------------------------------------------ svn:eol-style = native