Ejemplo n.º 1
0
        public void ActAndAssert(EvaluateRulesTestInput input, List <GeneratedTransaction> output)
        {
            // Act
            var result = new TransactionGenerator().Generate(input.Rules, input.BankRows);

            // Assert
            Assert.AreEqual(result.Count, output.Count);
            Assert.AreEqual(result.Count, output.Count);
            Assert.AreEqual(result.Count, output.Count);

            for (int i = 0; i < result.Count; i++)
            {
                var a = JsonConvert.SerializeObject(result[i]);
                var b = JsonConvert.SerializeObject(output[i]);
                Assert.AreEqual(a, b);
            }
            // Do this for other objects as well
        }
Ejemplo n.º 2
0
        public void TestTransactionGroup()
        {
            // Arrange
            var input = new EvaluateRulesTestInput()
            {
                BankRows = new List <BankRow>()
                {
                },
                Rules = new List <Rule>()
                {
                }
            };

            var output = new List <GeneratedTransaction>()
            {
            };

            // Act & Assert
            this.ActAndAssert(input, output);
        }