Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }