Beispiel #1
0
        public void DefaultParameterAspectTest()
        {
            var requestMock = new Mock <IRestRequest>(MockBehavior.Strict);

            var aspect = new GetBranchesOfPlanParameterAspect();

            aspect.ApplyToRestRequest(requestMock.Object);

            requestMock.Verify();
            requestMock.VerifyNoOtherCalls();
        }
Beispiel #2
0
        public void ParameterAspectTest()
        {
            var requestMock = new Mock <IRestRequest>(MockBehavior.Strict);

            requestMock
            .Setup(i => i.AddParameter("enabledOnly", null))
            .Returns(requestMock.Object)
            .Verifiable();

            var aspect = new GetBranchesOfPlanParameterAspect
            {
                OnlyEnabledBranches = true
            };

            aspect.ApplyToRestRequest(requestMock.Object);

            requestMock.Verify();
            requestMock.VerifyNoOtherCalls();
        }