Ejemplo n.º 1
0
        public void CalculateAverageNumberOfContractsPerClient_ContractsAreOpen_ReturnsTrue()
        {
            // Creating objects for Business rules, dummy CRUD Clients and Contracts
            DummyCRUD     dummyClientCrud     = GetDummyClientCRUD();
            DummyCRUD     dummyContractCrud   = GetDummyContractCRUD();
            BusinessRules businessRulesObject = new BusinessRules(dummyClientCrud, dummyContractCrud);

            // getting the value returned by the businessRules method
            var actualResult   = businessRulesObject.CalculateAverageNumberOfContractsPerClient();
            var expectedResult = 1;

            // comparing the values to determine if they are equal which means the method works correctly
            Assert.AreEqual(expectedResult, actualResult);
        }