testing

Testing whole cycle of paypal recurring payment at sandbox

混江龙づ霸主 提交于 2019-12-23 11:13:21
问题 I am currently trying to implement paypal recurring payment and I would like to test "whole cycle". I found this article http://www.paypalobjects.com/en_US/ebook/PP_Sandbox_UserGuide/testing_recurringpayments.html and also some references in stackoverlfow that it should work. But for me it does not seem to work. Maybe I have to dig into code for that but I was wondering should this actually work? I am using https://github.com/thenbrent/paypal-digital-goods library and I subscription details

Jest Unexpected identifier: React

十年热恋 提交于 2019-12-23 10:59:40
问题 When I try to execute a test on reactjs with jest, it always return me the error: I have correctly install Jest, I have try to remove import but it do an error with the next. App.test.js: import React from 'react'; import {shallow }from 'enzyme'; import renderer from 'react-test-renderer'; import ReactDOM from 'react-dom'; import App from './App.js'; import User from './Modules/User.js'; const user = { email: "test@gmail.com", first_name: "test", last_name: "test" } test('Users renders

Matching a stream for certain conditions

只谈情不闲聊 提交于 2019-12-23 10:47:43
问题 I am looking for a Java library that allows to match a sequence of objects, potentially mixing with matchers such as those of hamcrest. Ideally I would like to write a test that can check that an iterable contains a sequence that would look like a regular expression, but for objects rather than character strings: assertThat(myList).inSequence(oneOrMore(any()),zeroOrMore(equals(MyObject))); Mockito with verify is close what I would like, but some simple matchers are missing (like zeroOrMore)

Testing that an Activity returns the expected result

大兔子大兔子 提交于 2019-12-23 09:58:43
问题 I have the following Activity: package codeguru.startactivityforresult; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class ChildActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.child); this.resultButton = (Button) this.findViewById(R.id.result_button); this.resultButton.setOnClickListener

Changing $*DISTRO values for testing

情到浓时终转凉″ 提交于 2019-12-23 09:57:08
问题 I need to test a feature that includes this line: if $translate-nl && $*DISTRO.is-win I have tried to reassign a value to $*DISTRO, $*DISTRO='Windows 10'; but it says: Cannot modify an immutable Distro (debian (9.stretch))␤ $*DISTRO is a dynamic variable, and it makes sense that it's not modified. That said, is there any other way that code can be tested (other than going to Windows, of course) 回答1: my $*DISTRO = ... Hopefully modifying the original is unnecessary. It's generally unreasonable

Using different versions of a python library in the same process

无人久伴 提交于 2019-12-23 09:49:40
问题 We've got a python library that we're developing. During development, I'd like to use some parts of that library in testing the newer versions of it. That is, use the stable code in order to test the development code. Is there any way of doing this in python? Edit: To be more specific, we've got a library (LibA) that has many useful things. Also, we've got a testing library that uses LibA in order to provide some testing facilities (LibT). We want to test LibA using LibT, but because LibT

Spring context dirty after each integration test

僤鯓⒐⒋嵵緔 提交于 2019-12-23 09:39:07
问题 I recently started as a freelancer on my current project. One of the thing I threw myself on, was the failing Jenkins build (it was failing starting from April 8th, a week before I started here). Generally speaking, you could see a buttload of DI issues in the log. First thing I did, was get all tests to work in the same way, starting from the same application context. They also implemented their own "mocking" thing, which seemed to fail to work correctly. After a discussion with the lead dev

Mapper not initialized , error with my unit test Core.Net 2.0

拟墨画扇 提交于 2019-12-23 09:36:22
问题 I have a WebApi done in Core.net 2.0, with UOW , and automapper. Everything is working fine, but now I want to implement Unit Test with Nunit, and I have this error of automapper Message: System.InvalidOperationException : Mapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource

Is there any Windows Azure Local Development environment?

佐手、 提交于 2019-12-23 09:36:20
问题 I remember I stumbled upon a page once that said Microsoft has released an application that allows you to test your client applications for windows azure locally. The application would act as mock windows azure environment and you could use local end points for connecting to it. Does anyone know which application is it or what is its name? I can't find it on google. I'm sure someone has used it. 回答1: Yes, with the Azure SDK, you're installing what is called a "local fabric" which allows you

How to design code for testability

南楼画角 提交于 2019-12-23 09:34:06
问题 I have been looking at using TDD and implementing proper testing (only just started to learn how much better it makes your life) in any of my projects that I create in the future. So for the last couple of days I have been floating around on SO trying to learn about how to design your application for testability, but I still seem to be struggling with some of the ideas. I have read a lot that you should program against interfaces rather than classes . The main problem I'm having is, how many