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