Ejemplo n.º 1
0
        public void CalculateEstimatedRemainingTimeOnContract_ContractsAreOpen_ReturnsTrue()
        {
            // Creating objects for the DummyCrud Clients and Contracts and a Business ruels object so we can call the methods in that class
            DummyCRUD     dummyClientCrud     = GetDummyClientCRUD();
            DummyCRUD     dummyContractCrud   = GetDummyContractCRUD();
            BusinessRules businessRulesObject = new BusinessRules(dummyClientCrud, dummyContractCrud);

            // getting the value returned from the method and comparing it to the value that should be returned
            var actualResult   = businessRulesObject.CalculateEstimatedRemainingTimeOnContract(dummyContractCrud.contracts[0].ContractId);
            var expectedResult = 18262;

            Assert.AreEqual(expectedResult, actualResult);
        }