Exemplo n.º 1
0
 public void OnSuccess_AfterCall_InitTestEntity_ShouldBeApplied_IncrementArgumentValueAspect()
 {
     var entity = new TestEntity();
     dynamic myTest = new MyTestClass();
     myTest.InitTestEntity(entity);
     Assert.AreEqual(entity.Name, "KingAOP_OnSuccess");
     Assert.AreEqual(entity.Number, 100);
 }
Exemplo n.º 2
0
        public void OnEntry_ShouldHaveAbilityToChange_ReferenceArgument()
        {
            var entity = new TestEntity {Name = "Name", Number = 0};

            dynamic myTest = new MyTestClass();
            myTest.ResturnObjectArgument(entity);

            Assert.AreEqual("ChangedName", entity.Name);
            Assert.AreEqual(999, entity.Number);
        }
Exemplo n.º 3
0
 public void InitTestEntity(TestEntity testEntity)
 {
     testEntity.Name = "test";
     testEntity.Number = 0;
 }