如何在运行时找到Robolectric版本?

时间:2015-10-03 05:05:55

标签: android robolectric

有没有办法在运行时检索Robolectric的版本?我的环境受控制的库版本控制,并且只有在Robolectric具有特定版本时才能确保我运行某个测试(例如,为了避免运行时已知的问题)。例如:

<!DOCTYPE html>
<html>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>

    <div ng-app="myApp" ng-controller="myCtrl">
        Test : {{mytest()}} 
    </div>

    <script>
        var app = angular.module('myApp', []);
        app.controller('myCtrl', function($scope) {
            $scope.name= "John ";

            $scope.mytest = function () {
                console.log('my test');
                return 'something';
            };

        });
    </script>

</body>
</html>

0 个答案:

没有答案
相关问题