We have a Silverlight 4 app that is making the standard async call to a WCF service to get data from the database. We have an interface for this IDataService so we can mock it out. I've been reading about RhinoMocks and trying to understand how to write a test for this. I think I would need to test that the call was made to get the data (something like GetCustomers) and then that the GetCustomersCompleted method was called with the data. I've seen so many different examples today and the old way to raise an event vs the new way (and I didn't know either). Does anyone have a simple example of using RhinoMocks for this kind of test? It seems like it would be something very common if one is using TDD and RhinoMocks with Silverlight. Any examples or links would be greatly appreciated. After several days of exploring I'd be great full for any help in this area.
thanks in advance!
Bill
I was struggling trying to write some async tests for a WPF app until I found the following blog entry:
http://blog.tatham.oddie.com.au/2009/04/09/testing-the-world-and-writing-better-quality-code-along-the-way/
I believe it should work for the Silverlight version of Rhino Mocks as well.
Related
Currently, I'm instrumenting a python application using open-telemetry and jaeger. I was wondering if there is a way or a workaround to instantiate many instances of the the TraceProvider class, within the same multi-threaded application. I know I shouldn't do this, but I have my own reason :) The problem I'm facing is that the function set_tracer_provider() is implemented to be called only once. Is there any opentelemetry expert who can advise me on how to achieve this?
Many thanks.
I am researching tools for Component Testing for Microservices in the dotnetcore world.
Along with Component Testing I am planning to do Contract Testing as well using Pact.net.
While reading Pact.net here:
https://github.com/pact-foundation/pact-net
I found link to:
https://github.com/seek-oss/seek.automation.stub
which says its a Pact based stubbing library for .NET.
This makes lot of sense to use since I am going to use Pact and my Pacts can be used for stubbing.
But before this I was considering WireMock.net https://github.com/WireMock-Net/WireMock.Net. Has anyone tried each and share their feedback which one I should pick? WireMock seems to be very popular in community compared to this Seek Automation stub.
Thanks for your help in advance!
You could ask this on the Pact gitter channel https://gitter.im/realestate-com-au/pact
I know there is this: http://docs.phonegap.com/en/2.1.0/index.html but it doesn't really help.
I am trying to learn about the appView variable (I think it's a variable). I would've said it was a class but it starts with a lower case letter :/
The reason I am trying to learn that is because I am trying to understand the appView.addJavascriptInterface(Object, String) method.
My main goal is to send a variable from a java file to a javascript file. Tutorials online seem to be using the method stated above. Because the method takes in an object, the tutorials seem to be creating another class. I want to simplify my code as much as possible so I was seeing if there are any other options.
You will want to write a Plugin. We've already gone through the pain of the JS to Java and back to JS communication. If you purely use addJavaScriptInterface you will run into some edge cases where it doesn't work and we already guard against.
In appView.addJavascriptInterface(Object, String) method Object refers to Java object from which you want to transfer data from Java to java script.
You can't achieve functionality without creating new class.
Apart from Plugin usage above mentioned way only we can achieve communication between java and javascript in phonegap apps.
I am looking on the official site of Highcharts for Api wrappers and it does not contain an Api wrapper for Java. It only has highcharts-serverside-export which is for generating images on server side. Does anybody know if something like DotNet.Highcharts exists for JSF? I have come across this question as how to use Highcharts with JSF, but surely there must be some Api like that from .NET?
I came across the same problem as you. I started writing my own custom components to bridge JSF and highcharts. I have made my code available. It's not a full wrapper, but it's better than nothing.
I have a Rails app which implements a web service. I'm not sure how to best write tests for it.
It has one controller. Each method provides json output. As far as I can tell, functional (views) tests would be the right thing to use, but they seem to only work with HTML.
i think that you could be good with using a library like json_spec.
in combination with cucumber this could also server as a documentation for your api-users. have a look at this nice blog post using json_spec.