public void TestSimpleStruct() { string[] expected = new string[] { "namespace Test.Namespace", "{", " internal struct TestClass", " {", " private int count;", "", " private int increment;", "", " public TestClass(int count, int increment)", " {", " this.count = count;", " this.increment = increment;", " }", "", " internal int IncrementAndGet()", " {", " count = count + increment;", " return count;", " }", " }", "}" }; ProviderTestUtils.DoCSharpTest(expected, ProviderTestUtils.TestSimpleStructCompileUnit()); }
public void TestSimpleStruct() { string[] expected = { "Namespace Test.Namespace", " Friend Structure TestClass", " Private count As Integer", "", " Private increment As Integer", "", " Public Sub New(ByVal count As Integer, ByVal increment As Integer)", " Me.count = count", " Me.increment = increment", " End Sub", "", " Friend Function IncrementAndGet() As Integer", " count = count + increment", " Return count", " End Function", " End Structure", "End Namespace" }; ProviderTestUtils.DoVisualBasicTest(expected, ProviderTestUtils.TestSimpleStructCompileUnit()); }