From ee4524950d3b69dc8d3862413127f4c3e516471d Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Mon, 3 Dec 2007 02:28:16 +0000 Subject: [PATCH] Added simple test for RandomGuidGenerator. --- .../util/RandomGuidUidGeneratorTests.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 spring-eai-core/src/test/java/org/springframework/integration/util/RandomGuidUidGeneratorTests.java diff --git a/spring-eai-core/src/test/java/org/springframework/integration/util/RandomGuidUidGeneratorTests.java b/spring-eai-core/src/test/java/org/springframework/integration/util/RandomGuidUidGeneratorTests.java new file mode 100644 index 0000000000..28ecf278c8 --- /dev/null +++ b/spring-eai-core/src/test/java/org/springframework/integration/util/RandomGuidUidGeneratorTests.java @@ -0,0 +1,35 @@ +/* + * Copyright 2002-2007 the original author or authors. + * + * Licensed 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.springframework.integration.util; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Test; + +/** + * @author Mark Fisher + */ +public class RandomGuidUidGeneratorTests { + + @Test + public void testGeneratedIdIsNotNull() { + UidGenerator generator = new RandomGuidUidGenerator(); + Object id = generator.generateUid(); + assertNotNull(id); + } + +}