Advertisement
Guest User

Untitled

a guest
May 30th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. [Fact]
  2. public void WhenPropertyHasMultipleNonSortedAttributes_ThenShouldSortAttributes()
  3. {
  4. // Arrange
  5.  
  6. const string code =
  7. @"using System;
  8. using System.Diagnostics;
  9.  
  10. namespace HelloWorld
  11. {
  12. public class MyAwesomeModel
  13. {
  14. [Obsolete]
  15. [DebuggerStepThrough]
  16. [MonitoringDescription(""Nice"")]
  17. public string MyProperty {get;set;}
  18. public int MyProperty1 {get;set;}
  19. }
  20. }";
  21.  
  22. // Act
  23.  
  24. var actual = CodeCleaner.Clean(code);
  25.  
  26. // Assert
  27.  
  28. const string expected =
  29. @"using System;
  30. using System.Diagnostics;
  31.  
  32. namespace HelloWorld
  33. {
  34. public class MyAwesomeModel
  35. {
  36. [DebuggerStepThrough]
  37. [MonitoringDescription(""Nice"")]
  38. [Obsolete]
  39. public string MyProperty {get;set;}
  40. public int MyProperty1 {get;set;}
  41. }
  42. }";
  43. Assert.Equal(expected, actual);
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement