public void InsertCashTransaction_CallToString_ReturnsString() { User user = Substitute.For <User>(userArgs); InsertCashTransaction transaction = new InsertCashTransaction(user, 50m); Assert.That(transaction.ToString(), Is.TypeOf <string>()); }
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); }
public void DisplayAddCreditsTransaction(InsertCashTransaction transaction) { Console.WriteLine(transaction.ToString()); }