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

            Assert.IsNotNull(walker.Invocation);
        }
Example #2
0
        public async Task WalkWhenContainingTypeIsNotBusinessBase()
        {
            var code =
                @"namespace Csla.Analyzers.Tests.Targets.FindGetOrReadInvocationsWalkerTests
{
  public class WalkWhenContainingTypeIsNotBusinessBase { }
}";
            var walker = await FindGetOrReadInvocationsWalkerTests.GetWalker(code);

            Assert.IsNull(walker.Invocation);
        }
Example #3
0
        public async Task WalkWhenContainingTypeIsBusinessBaseAndInvocationIsReadProperty()
        {
            var code =
                @"namespace Csla.Analyzers.Tests.Targets.FindGetOrReadInvocationsWalkerTests
{
  public class WalkWhenContainingTypeIsBusinessBaseAndInvocationIsReadProperty
    : BusinessBase<WalkWhenContainingTypeIsBusinessBaseAndInvocationIsReadProperty>
  {
    public void Go()
    {
      this.ReadProperty(null);
    }
  }
}";
            var walker = await FindGetOrReadInvocationsWalkerTests.GetWalker(code);

            Assert.IsNotNull(walker.Invocation);
        }