001package com.ganteater.ae.processor.annotation;
002
003import static org.junit.Assert.*;
004
005import java.lang.annotation.Retention;
006import java.lang.annotation.RetentionPolicy;
007
008import org.apache.commons.lang.StringUtils;
009import org.junit.Test;
010
011public class CommandDescriptionTest {
012
013        @Test
014        public void annotation_shouldHaveRuntimeRetention() {
015                // Arrange
016                Retention retention = CommandDescription.class.getAnnotation(Retention.class);
017
018                // Act
019                RetentionPolicy policy = retention.value();
020
021                // Assert
022                assertEquals(RetentionPolicy.RUNTIME, policy);
023        }
024
025        @Test
026        public void defaultValue_shouldBeEmptyString() throws Exception {
027                // Arrange / Act
028                Object defaultValueObj = CommandDescription.class.getMethod("value").getDefaultValue();
029
030                // Assert
031                assertEquals(StringUtils.EMPTY, defaultValueObj);
032        }
033}