Example #1
0
        public void Test_Save_CashPaymentDetail(decimal amount, string result, string type)
        {
            // Prepare
            CashPaymentDetail source  = CashPaymentDetail.Create(amount, result, type);
            string            id      = source.Id;
            IStorageService   service = NewSignalService;

            // Pre-validate
            Assert.NotNull(service);

            // Perform
            service.AddCashPaymentDetails(source);
            CashPaymentDetail target = service.GetCashPaymentDetails(x => x.Id == id).SingleOrDefault();

            // Post-validate
            Assert.NotNull(target);
            Assert.Equal(source.Amount, target.Amount);
            Assert.Equal(source.Result, target.Result);
            Assert.Equal(source.Type, target.Type);
            Assert.Equal(source.Timestamp, target.Timestamp);
        }