Esempio n. 1
0
        public void CheckDirectVsFileWith5ItemsListReturnAnOutputlistwith1item()
        {
            //Arrange
            var logProxy = MockRepository.GenerateStub<ILogProxy>();
            var verifyer = new Verifyer(logProxy);

            var parameter = new Parameter("towards100", 90);
            var verifyerParameters = CreateVerifyParameterList("towards100", 85, 10, 0, RatchetingDirections.TowardsHundred);
            //Act
            List<OutputParameter> resultingList = (List<OutputParameter>)verifyer.CheckDirectVsParameterList(parameter, verifyerParameters);

            Assert.AreEqual(1, resultingList.Count );
        }
Esempio n. 2
0
        public void CheckDirectVsFileInputTakesAListOfVerifyParametersAndADirectInputParameterAndStartsVerify()
        {
            //Arrange
            var logProxy = MockRepository.GenerateMock<ILogProxy>();
            var verifyer = new Verifyer(logProxy);
            logProxy.Expect(
                x =>
                x.LogThis(MessageImportance.Normal,
                          "Success: towards100 -> Current is better than Target and can be ratcheted to 95"));
            var parameter = new Parameter("towards100", 90);
            var verifyerParameters = CreateVerifyParameterList("towards100",85,10,0,RatchetingDirections.TowardsHundred );
            //Act
               List<OutputParameter> resultingList = ( List<OutputParameter>)verifyer.CheckDirectVsParameterList(parameter, verifyerParameters);
            var reesult = resultingList.FirstOrDefault(x => x.ParameterName == "towards100");
            Assert.AreEqual(true, reesult.IsOk );
            Assert.AreEqual("Success: towards100 -> Current is better than Target and can be ratcheted to 95", reesult.VeriferResult );

               // logProxy.VerifyAllExpectations();
        }