Thursday, 15 April 2010

Mockito Test Structures

/*    Generalisation for verifying a method (testedFunction) of system under test (sut)
            is called that depends on a method (someOperation) of (dependency)
           
            var dependency:Dependency = Dependency(mock(Dependency));
            // given
            var sut:Sut = new Sut(dependency);
            // when
            sut.testedFunction(10);
            // then
            mockito.verify().that(dependency.someOperation(10));
        */

Posted via email from fasanya's posterous

No comments: