Exemple #1
0
        public void InsertCashTransaction_CallToString_ReturnsString()
        {
            User user = Substitute.For <User>(userArgs);

            InsertCashTransaction transaction = new InsertCashTransaction(user, 50m);

            Assert.That(transaction.ToString(), Is.TypeOf <string>());
        }
Exemple #2
0
        public void ToString_BuyTransAction_ShouldReturnString(string desc)
        {
            //arrange
            User     user            = new User();
            DateTime date            = Convert.ToDateTime("1 / 1 / 2020");
            Guid     id              = Guid.NewGuid();
            decimal  amount          = 20;
            InsertCashTransaction tr = new InsertCashTransaction(user: user, date: date, id: id, amount: amount);

            string expected = $"{date};{id};Insert;{user};{amount}";
            //act
            string actual = tr.ToString();

            //assert
            Assert.AreEqual(expected, actual, desc);
        }
Exemple #3
0
 public void DisplayAddCreditsTransaction(InsertCashTransaction transaction)
 {
     Console.WriteLine(transaction.ToString());
 }