/NRefactory/ICSharpCode.NRefactory.VB.Tests/Parser/TypeLevel/EventDeclarationTests.cs

http://github.com/icsharpcode/ILSpy · C# · 25 lines · 21 code · 2 blank · 2 comment · 0 complexity · 09042e0b15f31c9a3cb8d856c6da841d MD5 · raw file

  1. // Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
  2. // This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
  3. using System;
  4. using ICSharpCode.NRefactory.VB.Ast;
  5. using NUnit.Framework;
  6. namespace ICSharpCode.NRefactory.VB.Tests.Ast
  7. {
  8. [TestFixture]
  9. public class EventDeclarationTests
  10. {
  11. #region VB.NET
  12. [Test]
  13. public void VBNetSimpleEventDeclarationTest()
  14. {
  15. EventDeclaration ed = ParseUtil.ParseTypeMember<EventDeclaration>("event MyEvent(x as Integer)");
  16. Assert.AreEqual(1, ed.Parameters.Count);
  17. Assert.AreEqual("MyEvent", ed.Name);
  18. Assert.IsFalse(ed.HasAddRegion);
  19. Assert.IsFalse(ed.HasRemoveRegion);
  20. }
  21. #endregion
  22. }
  23. }