Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Fact]
- public void WhenPropertyHasMultipleNonSortedAttributes_ThenShouldSortAttributes()
- {
- // Arrange
- const string code =
- @"using System;
- using System.Diagnostics;
- namespace HelloWorld
- {
- public class MyAwesomeModel
- {
- [Obsolete]
- [DebuggerStepThrough]
- [MonitoringDescription(""Nice"")]
- public string MyProperty {get;set;}
- public int MyProperty1 {get;set;}
- }
- }";
- // Act
- var actual = CodeCleaner.Clean(code);
- // Assert
- const string expected =
- @"using System;
- using System.Diagnostics;
- namespace HelloWorld
- {
- public class MyAwesomeModel
- {
- [DebuggerStepThrough]
- [MonitoringDescription(""Nice"")]
- [Obsolete]
- public string MyProperty {get;set;}
- public int MyProperty1 {get;set;}
- }
- }";
- Assert.Equal(expected, actual);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement