使用命令行时:
//Mock as above
//Mock service behavior
firstServiceImpl.Setup(m=>m.Method1()).Returns(1)
//test method of you controller, lets assume that the method1 of controller
//is only calling firstService method named Method1()
var result = SampleController.Method1();
Assert.IsTrue( result == 1)
firstService.Verify(m=>m.Method1(), Times.Once()).
我得到一个结果,但是当我使用php openssl_sign或phpseclib Crypt_rsa签名方法时:
echo "edv" | openssl rsautl -sign -inkey id_rsa_edv.txt | base64 -w 0
我得到另一个(phpseclib和openssl_sign()相同)。这是哈希算法,openssl.cnf还是我做错了吗?