예제 #1
0
        public void TestPropertyArrayArray()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント
        /// </summary>
        Type[][] propertyName;
";
            string expected = @"- propertyName : Type[][] 'サマリー・コメント'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }
예제 #2
0
        public void TestPropertyGenerictype()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント
        /// </summary>
        Dictionary<Type1, Type2> propertyName;
";
            string expected = @"- propertyName : Dictionary<Type1, Type2> 'サマリー・コメント'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }
예제 #3
0
        public void TestMethodWithArgumentList()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント
        /// </summary>
        /// <returns></returns>
        public static Type MethodName(int a,int b)
";
            string expected = @"+ MethodName(int a,int b) : Type {static} 'サマリー・コメント'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }
예제 #4
0
        public void TestConstructor()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント
        /// </summary>
        ConstructorName()

";
            string expected = @"- ConstructorName() :  'サマリー・コメント'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }
예제 #5
0
        public void TestPropertyReadonly()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント
        /// </summary>
        readonly string CONST_STRING_NAME = ""This is a value."";

";
            string expected = @"- CONST_STRING_NAME : string <<readonly>> 'サマリー・コメント'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }
예제 #6
0
        public void TestPropertyConstIgnoreAttribute()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント
        /// </summary>
        [Tooltip(""画像ファイル名"")]
        public string propertyName = ""This is a value."";

";
            string expected = @"+ propertyName : string 'サマリー・コメント'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }
예제 #7
0
        public void TestCommentSummaryMultiple()
        {
            string input    = @"        /// <summary>
        /// サマリー・コメント1行目
        /// サマリー・コメント2行目
        /// サマリー・コメント3行目
        /// </summary>
        static Type propertyName;
";
            string expected = @"- propertyName : Type {static} 'サマリー・コメント1行目 サマリー・コメント2行目 サマリー・コメント3行目'";

            CodeToPibotBuilder codeToPibotBuilder = new CodeToPibotBuilder();
            Pibot  pibot  = codeToPibotBuilder.Translate(input);
            string output = new PibotToUmlBuilder().Build(pibot);

            Assert.AreEqual(expected: expected, actual: output);
        }