コード例 #1
0
        public void SetUp()
        {
            _instance = Builder <PlanReceiptOrder> .CreateNew()
                        .WithConstructor(() => new PlanReceiptOrder(100))
                        .With(x => x.PlanCertificates, Builder <PlanCertificate> .CreateListOfSize(1).Build())
                        .Build();

            _instance.PlanCertificates[0].PlanReceiptOrder = _instance;

            _copyContext = new CopyContext <PlanReceiptOrder>();
            _copyContext.SetSourceValue(_instance);
        }
コード例 #2
0
        public void Test2()
        {
            var pc  = new PlanCertificate();
            var pro = new PlanReceiptOrder();
            var pa  = new PlanReceiptOrderPersonalAccount();

            //var openStateMachine = new StateMachine<PlanCertificateState, ITrigger>(
            //    () => pc.State,
            //    state => pc.State = state);

//            openStateMachine.Configure(PlanCertificateState.Close)
//                .Permit(
//                    pro.WhenAnyValue(x => x.State)
//                        .Where(state => state == PlanReceiptOrderState.Close)
//                        .Select(_ => Unit.Default),
//                    PlanCertificateState.Close)
//                .Permit(
//                    pro.WhenAnyValue(x => x.State)
//                        .Where(state => state == PlanReceiptOrderState.Confirm)
//                        .Select(_ => Unit.Default),
//                    PlanCertificateState.Confirm);
        }
コード例 #3
0
 public PlanReceiptOrderSetGroupState(PlanReceiptOrder planReceiptOrder, PersonalAccount personalAccount)
 {
     RnPlanReceiptOrder = planReceiptOrder.Rn;
     PersonalAccount    = personalAccount.Numb;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanReceiptOrderSetState"/> class.
 /// </summary>
 /// <param name="planReceiptOrder">
 /// The plan receipt order.
 /// </param>
 /// <param name="state">
 /// The state.
 /// </param>
 public PlanReceiptOrderSetState(PlanReceiptOrder planReceiptOrder, PlanReceiptOrderState state)
 {
     RN    = planReceiptOrder.Rn;
     State = state;
 }
コード例 #5
0
 public СonfirmStateFalling(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
     _repositoryFactory = repositoryFactory;
 }
コード例 #6
0
 protected СonfirmStateBase(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
 }
コード例 #7
0
 public NotСonfirmState(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
 }
コード例 #8
0
 public EntityBase(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory)
 {
     Entity      = entity;
     _repository = repositoryFactory.Create <PlanReceiptOrder>();
 }
コード例 #9
0
 public CloseStateEmerge(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
 }