Beispiel #1
0
        public async Task WalkWhenFieldIsNotUsedByPropertyInfoManagement()
        {
            var walker = await EvaluateManagedBackingFieldsWalkerTests.GetWalker(
                $@"Targets\{nameof(EvaluateManagedBackingFieldsWalkerTests)}\{(nameof(this.WalkWhenFieldIsNotUsedByPropertyInfoManagement))}.cs");

            Assert.IsFalse(walker.UsesField);
        }
Beispiel #2
0
        public async Task WalkWhenFieldIsNotUsedByPropertyInfoManagement()
        {
            var code =
                @"namespace Csla.Analyzers.Tests.Targets.FindSetOrLoadInvocationsWalkerTests
{
  public class WalkWhenFieldIsNotUsedByPropertyInfoManagement
    : BusinessBase<WalkWhenFieldIsNotUsedByPropertyInfoManagement>
  {
    public static readonly PropertyInfo<string> DataProperty =
      RegisterProperty<string>(_ => _.Data);
    public string Data { get; set; }
  }
}";
            var walker = await EvaluateManagedBackingFieldsWalkerTests.GetWalker(code);

            Assert.IsFalse(walker.UsesField);
        }