Search Results

Search found 299 results on 12 pages for 'rhino mocks'.

Page 8/12 | < Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >

  • The Silverlightning Talks

    - by Brian Genisio's House Of Bilz
    Tomorrow, I will be speaking in Grand Rapids at the Silverlight Firestarter.  It is a one day event intended to get people bootstrapped with Silverlight.  I will be giving the “Advanced Topics” presentation.  I have decided to run it as a series of “Lightning Talks”.  The idea is to give a lot of breadth so you know that the topic exists and move quickly between them.  To go along with the talks, here are a bunch of links that you might find useful: MVVM http://msdn.microsoft.com/en-us/magazine/dd458800.aspx http://msdn.microsoft.com/en-us/magazine/dd419663.aspx http://channel9.msdn.com/shows/Continuum/MVVM/ http://karlshifflett.wordpress.com/2008/11/08/learning-wpf-m-v-vm/ http://johnpapa.net/silverlight/5-minute-overview-of-mvvm-in-silverlight/ Good MVVM Frameworks http://www.galasoft.ch/mvvm/getstarted/ http://caliburn.codeplex.com/Wikipage   Prism http://compositewpf.codeplex.com/ http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/10/27/prism-and-silverlight-screencasts-on-channel-9.aspx http://www.grumpydev.com/2009/07/04/why-shouldn%E2%80%99t-i-use-prism/   Unit Testing Silverlight Unit Testing Framework http://code.msdn.microsoft.com/silverlightut http://silverlight.codeplex.com/ http://www.jeff.wilcox.name/2008/03/silverlight2-unit-testing/ NUnit Testing with Silverlight http://weblogs.asp.net/nunitaddin/archive/2008/05/01/silverlight-nunit-projects.aspx Useful Testing Tools http://testdriven.net/ http://nunit.org/ http://code.google.com/p/moq/ http://www.ayende.com/projects/rhino-mocks.aspx   Navigation Framework http://www.silverlightshow.net/items/The-Silverlight-3-Navigation-Framework.aspx http://www.silverlight.net/learn/videos/silverlight-videos/navigation-framework/   Farseer Physics Engine http://farseerphysics.codeplex.com/Wikipage http://physicshelper.codeplex.com/Wikipage http://www.andybeaulieu.com/Home/tabid/67/Default.aspx   Windows Phone 7 http://www.silverlight.net/getstarted/devices/windows-phone/ http://msdn.microsoft.com/en-us/library/ff402535%28VS.92%29.aspx

    Read the article

  • unit level testing, agile, and refactoring

    - by dsollen
    I'm working on a very agile development system, a small number of people with my doing the vast majority of progaming myself. I've gotten to the testing phase and find myself writing mostly functional level testing, which I should in theory be leavning for our tester (in practice I don't entirely...trust our tester to detect and identify defects enough to leave him the sole writter of functional tests). In theory what I should be writing is Unit level tests. However, I'm not sure it's worth the expense. Unit testing takes some time to do, more then functional testing since I have to set up mocks and plugs into smaller units that weren't design to run in issolation. More importantly, I find I refactor and redesign heavily-part of this is due to my inherriting code that needed heavy redesign and is still being cleaned up, but even once I've finished removing parts that need work I'm sure in the act of expanding the code I'll still do a decent amount of refactoring and redesign. It feels as if I will break my unit tests, forcing wasted time to refactor them as well, often due to unit test, by definition, having to be coupled so closely to the code structure. So.is it worth all the wasted time when functional tests, that will never break when I refactor/redesign, should find most defects? Do unit tests really provide that much extra defect detetection over through functional? and how does one create good unit tests that work with very quick and agile code that is modified rapidly? ps, I would be fine/happy with links to anything one considers an excellent resource for how to 'do' unit testing in a highly changing enviroment. edit: to clarify I am doing a bit of very unoffical TDD, I just seem to be writing tests on what would be considered a functional level rather then unit level. I think part of this is becaus I own nearly all of the project I don't feel I need to limit the scope as much; and part of it is that it's daunting to think of trying to go back and retroactively add the unit tests needed to cover enough code that I can feel comfortable testing only a unit without the full functionality and trust that unit still works with the rest of the units.

    Read the article

  • When creating an library published on CodePlex, how "bad" would it be for the unit-test projects to rely on commercial products?

    - by Lasse V. Karlsen
    I have started a project on CodePlex for a WebDAV server implementation for .NET, so that I can host a WebDAV server in my own programs. This is both a learning/research project (WebDAV + server portion) as well as a project I think I can have much fun with, both in terms of making it and using it. However, I see a need to do mocking of types here in order to unit-testing properly. For instance, I will be relying on HttpListener for the web server portion of the WebDAV server, and since this type has no interface, and is sealed, I cannot easily make mocks or stubs out of it. Unless I use something like TypeMock. So if I used TypeMock in the unit-test projects on this library, how bad would this be for potential users? The projects are made in C# 3.5 for .NET 3.5 and 4.0, and the project files was created with Visual Studio 2010 Professional. The actual class libraries you would end up referencing in your software would of course not be encumbered with anything remotely like this, only the unit-test libraries. What's your thoughts on this? As an example, I have in my old code-base, which is private, the ability to just initiate a WebDAV server with just this: var server = new WebDAVServer(); This constructs, and owns, a HttpListener instance internally, and I would like to verify through unit-tests that if I dispose of this server object, the internal listener is disposed of. If, on the other hand, I use the overload where I hand it a listener object, this object should not be disposed of. Short of exposing the internal listener object to the outside world, something I'm a bit loath to do, how can I in a good way ensure that the object was disposed of? With TypeMock I can mock away parts of this object even though it isn't accessed through interfaces. The alternative would be for me to wrap everything in wrapper classes, where I have complete control.

    Read the article

  • How would you TDD the functionality of getting the corresponding process of a running windows service?

    - by Matt Spinelli
    Purpose Over the last year or more I've been learning unit testing via books I've read recently like The Art of Unit Testing, Working Effectively with Legacy Code, and others. I've also been using unit tests, mocking frameworks, and the like, periodically at work and definitely see the value. However, I'm still having a hard time wrapping my mind around TDD (as opposed to TAD) when the situation calls for code that is gong to mostly use external API calls. Problem to solve Get the process associated with a windows service using the service name. example: Function GetProcess(ByVal serviceName As String) As Process Rules Show each major iteration in production & test code using TDD No need to see any other code or configuration that is required to get things to run. Just curious about the interfaces, concrete classes, and test methods. C# or VB.NET Must use the .Net framework regarding services/processes (i.e. System.Diagnostics.Process) Test Frameworks: Nunit or MSTest Isolation Frameworks: Moq, Rhino Mock, or Microsoft Moles Must write true unit tests (no integration tests) Additional notes As far as I can tell there are two approaches design wise. Use an Inversion of Control approach along with using the Adapter and/or Facade patterns to wrap the underlying .net framework objects dealing with processes and services. Keep the .net framework code in the class containing the Get Process method and use code detouring (interception) via Microsoft Moles to isolate the hard dependencies from the method under test.

    Read the article

  • Should we test all our methods?

    - by Zenzen
    So today I had a talk with my teammate about unit testing. The whole thing started when he asked me "hey, where are the tests for that class, I see only one?". The whole class was a manager (or a service if you prefer to call it like that) and almost all the methods were simply delegating stuff to a DAO so it was similar to: SomeClass getSomething(parameters) { return myDao.findSomethingBySomething(parameters); } A kind of boilerplate with no logic (or at least I do not consider such simple delegation as logic) but a useful boilerplate in most cases (layer separation etc.). And we had a rather lengthy discussion whether or not I should unit test it (I think that it is worth mentioning that I did fully unit test the DAO). His main arguments being that it was not TDD (obviously) and that someone might want to see the test to check what this method does (I do not know how it could be more obvious) or that in the future someone might want to change the implementation and add new (or more like "any") logic to it (in which case I guess someone should simply test that logic). This made me think, though. Should we strive for the highest test coverage %? Or is it simply an art for art's sake then? I simply do not see any reason behind testing things like: getters and setters (unless they actually have some logic in them) "boilerplate" code Obviously a test for such a method (with mocks) would take me less than a minute but I guess that is still time wasted and a millisecond longer for every CI. Are there any rational/not "flammable" reasons to why one should test every single (or as many as he can) line of code?

    Read the article

  • How do functional languages handle a mocking situation when using Interface based design?

    - by Programmin Tool
    Typically in C# I use dependency injection to help with mocking; public void UserService { public UserService(IUserQuery userQuery, IUserCommunicator userCommunicator, IUserValidator userValidator) { UserQuery = userQuery; UserValidator = userValidator; UserCommunicator = userCommunicator; } ... public UserResponseModel UpdateAUserName(int userId, string userName) { var result = UserValidator.ValidateUserName(userName) if(result.Success) { var user = UserQuery.GetUserById(userId); if(user == null) { throw new ArgumentException(); user.UserName = userName; UserCommunicator.UpdateUser(user); } } ... } ... } public class WhenGettingAUser { public void AndTheUserDoesNotExistThrowAnException() { var userQuery = Substitute.For<IUserQuery>(); userQuery.GetUserById(Arg.Any<int>).Returns(null); var userService = new UserService(userQuery); AssertionExtensions.ShouldThrow<ArgumentException>(() => userService.GetUserById(-121)); } } Now in something like F#: if I don't go down the hybrid path, how would I test workflow situations like above that normally would touch the persistence layer without using Interfaces/Mocks? I realize that every step above would be tested on its own and would be kept as atomic as possible. Problem is that at some point they all have to be called in line, and I'll want to make sure everything is called correctly.

    Read the article

  • Could a singleton type replace static methods and classes?

    - by MKO
    In C# Static methods has long served a purpose allowing us to call them without instantiating classes. Only in later year have we became more aware of the problems of using static methods and classes. They can’t use interfaces They can’t use inheritance They are hard to test because you can’t make mocks and stubs Is there a better way ? Obviously we need to be able to access library methods without instantiated classes all the time otherwise our code would become pretty cluttered One possibly solution is to use a new keyword for an old concept: the singleton. Singleton’s are global instances of a class, since they are instances we can use them as we would normal classes. In order to make their use nice and practical we'd need some syntactic sugar however Say that the Math class would be of type singleton instead of an actual class. The actual class containing all the default methods for the Math singleton is DefaultMath, which implements the interface IMath. The singleton would be declared as singleton Math : IMath { public Math { this = new DefaultMath(); } } If we wanted to substitute our own class for all math operations we could make a new class MyMath that inherits DefaultMath, or we could just inherit from the interface IMath and create a whole new Class. To make our class the active Math class, you'd do a simple assignment Math = new MyMath(); and voilá! the next time we call Math.Floor it will call your method. Note that for a normal singleton we'd have to write something like Math.Instance.Floor but the compiler eliminates the need for the Instance property Another idea would be to be able to define a singletons as Lazy so they get instantiated only when they're first called, like lazy singleton Math : IMath What do you think, would it have been a better solution that static methods and classes? Is there any problems with this approach?

    Read the article

  • TDD - How to start really thinking TDD?

    - by user74825
    I have been reading about Agile, XP methodologies and TDDs. I have been in projects which states it needs to do TDD, but most of the tests are somehow integration tests or during the course of project TDD is forgotten in effort to finish codes faster. So, as far as my case goes, I have written unit tests, but I find myself going to start writing code first instead of writing a test. I feel there's a thought / design / paradigm change which is actually huge. So, though one really believes in TDD, you actually end up going back old style because of time pressure / project deliverables. I have few classes where I have pure unit tested code, but I can't seem to continue with the process, when mocks come into picture. Also, I see at times : "isn't it too trivial to write a test for it" syndrome. How do you guys think I should handle this?

    Read the article

  • How to debug nHibernate/RhinoMocks TypeInitializer exception

    - by Joe Future
    Pulling my hair out trying to debug this one. Earlier this morning, this code was working fine, and I can't see what I've changed to break it. Now, whenever I try to open an nHibernate session, I'm getting the following error: Test method BCMS.Tests.Repositories.BlogBlogRepositoryTests.can_get_recent_blog_posts threw exception: System.TypeInitializationException: The type initializer for 'NHibernate.Cfg.Environment' threw an exception. --- System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Castle.DynamicProxy.Serialization.ProxyObjectReference,Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f'.. Any thoughts on how to debug what's going on here?

    Read the article

  • Using javax.script to run javascript with browser settings (e.g. envjs)?

    - by Shane
    I am trying to run Protovis javascript from a Java program: ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("JavaScript"); engine.eval(new java.io.FileReader("protovis-d3.1.js")); In order to run this, the JavaScript engine needs to have all the context of a web browser. The best option for this seems to be envjs. Unfortunately it seems that the version of Rhino included in the JVM isn't up to date and doesn't include everything that's necessary for envjs. Has anyone had any success working with a browser context from javax.script.

    Read the article

  • Best server-side javascript servers.

    - by fmsf
    Hey, I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like: Node.js Rhino SpiderMonkey among others. Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js because it's based on Google's V8 engine. And seems easy to use. But some feedback on what you would choose would be great. Edit: Some benchmarks for Node. I'm thinking on going with this one but feedback is still welcome. Thanks

    Read the article

  • rspec, autotest and Rails 3 beta 2 can't find executable issue

    - by Toby Hede
    I am running Rails 3 Beta2 and attempting to get Autotest working with rspec. When I run autospec, I receive the following message: /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `bin_path': can't find executable autospec for rspec-2.0.0.beta.5 (Gem::Exception) from /usr/local/bin/autospec:19 I am using Ruby 1.9.1 with the following Gems: rails (3.0.0.beta2) railties (3.0.0.beta2) rspec (2.0.0.beta.5) rspec-core (2.0.0.beta.5) rspec-expectations (2.0.0.beta.5) rspec-mocks (2.0.0.beta.5) rspec-rails (2.0.0.beta.5) ZenTest (4.3.1) Any help would be greatly appreciated.

    Read the article

  • Server Side Javascript

    - by XGreen
    Hi all, I can't help to see in many sites I visit the enthusiasm about server side javascript and the appealing look of a single language governing all tiers of the site. Mozilla Rhino, Aptana Jaxer and various John Resig's articles are some of the highlights of my search. I wanted to ask for some input from you guys on SO. your opinions and preferably experience in this. I do most of the data access and business logic currently either with asp.net or php depending on the hosting package of the client. Is anyone among you who's gave up these for ssjs?

    Read the article

  • inject a mockups to a bean that has @autowired annotations

    - by santiagozky
    I have a bean that has a couple of beans injected with the autowire annotation (no qualifier). Now, for testing reasons I want to inject some mocks to the bean instead of the ones being autowired (some DAOs). Is there any way I can change which bean is being injected without modifying my bean? I don't like the idea of adding annotations my code just to test it and then remove then for production. I am using spring 2.5. The bean look like this: @Transactional @Service("validaBusinesService") public class ValidaBusinesServiceImpl implements ValidaBusinesService { @Autowired OperationDAO operationDAO; @Autowired BinDAO binDAO; @Autowired CardDAO cardDAO; @Autowired UserDAO userDAO; ... ... }

    Read the article

  • Anyone using Moles / Pex in production?

    - by dferraro
    Hi all, I did search the forum and did not find a similar question. I'm looking to make a final decision on our mocking framework of choice moving forward as a best practice - I've decided on Moq... untill I just recently discovered MS has finally created a mocking framework called Moles which seems to work similar to TypeMock via the profiler API sexyness etc.. There's a million 'NMock vs Moq vs TypeMock vs Rhino....' threads on here. But I never see Moles involved.In fact, I did not even know if its existence until a short time ago. Anyone using it? In Production? Anyone dump their old mocking framework for it, and if so, which one? How did it compare to ther mocking frameworks you've used? thanks.. ps, we are using VS2008 and are moving to 2010 shortly.

    Read the article

  • Learning about tests for junior programmers

    - by RHaguiuda
    I`m not sure if its okay to ask it on stackoverflow. Ive been reading a log about tests, unit tests, tests frameworks, mocks and so on, but as a junior programmer I dont know anything about tests, not even where to start! Can anyone explain to young programmers about tests, how they`re run, where and what to test, what is unit testing, integration testing, automated tests? How much to test? And more important: how much test is enough? I belive this would be very helpfull. If possible indicate a few books too about these subjects. Thanks

    Read the article

  • How do I get developers to treat test code as "real" code?

    - by womp
    In the last two companies I've been at, there is an overriding mentality among developers that it's okay to write unit tests in a throw-away style. Code that they would never write in the actual product suddenly becomes OK in the unit tests. I'm talking Rampant copying and pasting between tests Code styling rules not followed Hard-coded magic strings across tests No object-oriented thought or design for integration tests, mocks or helper objects (250 line single-function tests!) .. and so on. I'm highly dissatisfied with the quality of the test code. Generally we do not do code reviews on our test assemblies, and we also do not enforce style or code analysis of them on our build server. Is that the only way to overcome this inertia about test quality? I'm looking for ideas to take to our developers, without having to go to higher management saying that we need to use resources for enforcement of test quality (although I will if I have to). Any thoughts or similar experiences?

    Read the article

  • Unit Testing, IDataContext and Stored Procedures via Linq

    - by Terry_Brown
    hey folks, I'm currently using Stephen Walther's approach to unit testing Linq to SQL and the datacontext (http://stephenwalther.com/blog/archive/2008/08/17/asp-net-mvc-tip-33-unit-test-linq-to-sql.aspx) which is working a treat for all things linq. My Dal layer takes in an IDataContext, I use DI (via Unity) to concrete that up as the correct DataContext object and all works well. But - we have a company policy here of writes going via Stored Procs. Has anyone come up with a solution for mocking/faking the data context and still allowing stored procs to effectively be unit tested? I've got no real experience of any of the mocking frameworks (Rhino etc.) so if these are the correct means of doing this, I'd love some pointers on guides for them. Many thanks, Terry

    Read the article

  • Handling changes in an interface shared across multiple solutions?

    - by Anthony Mastrean
    Our "main" solution is the development code: shared libraries, services, UI projects, etc. The other solution is an integration and automated tests solution. It references several of the development projects. The reason it is separate is to avoid interference with the development solution's unit test VSMDI file. And to allow us to play with different execution methods (other test runners, like Gallio or StoryTeller) without interfering with the development solution. Recently, an interface changed in the development solution, one of our test mocks implemented that interface. But, it was not updated because there was no warning at compile time because it was in another solution. This broke our CI build. Does anyone have a similar setup? How do you handle these issues, do you follow a strict procedure or is there some kind of technical answer?

    Read the article

  • Mock Repository vs. Real Repository w/Mocked Data

    - by n8wrl
    I must be doing something fundamentally wrong. I am implmenting my repositories and then testing them with mocked data. All is well. Now I want to test my domain objects so I point them at mock repositories. But I'm finding that I have to re-implement logic from the 'real' repositories into the mocks, or, create 'helper classes' that encapsulate the logic and interact with the repositories (real or mock), and then I have to test those too. So what am I missing - why implement and test mock repositories when I could use the real ones with mocked data? EDIT: To clarify, by 'mocked data' I do not hit the actual database. I have a 'DB mock layer' I can insert under the real repositories that returns known-data.

    Read the article

  • server side Adobe AIR apps

    - by Robbie
    This might sound like a really stupid question, but is there anyway to run an Adobe AIR application in a headless server side mode on a non-UI server (i.e. Linux)? I'm trying to build server side bots to interact with an API (grapevinetalk.com) and I want to use existing code to do that without having to re-write all the data munging etc for a new application. The application I'm trying to port is essentially a jQuery based AIR desktop app that I want to reuse for server side interactions. I've tried Rhino with envjs.com, but am having some issues so am looking at alternatives. Thanks Robbie

    Read the article

  • Why has Javascript been (mostly) only a browser-side technology for more than 10 years?

    - by Gabriel Cuvillier
    Recently there is a lot of projects that pushes Javascript into other directions: as a general purpose scripting language (GLUEScript, Rhino), as an extension language (QTScript, Adobe Reader, OO Macros), Widgets (Yahoo Widgets, MS Gadgets, Dashboard), and even server-side JS & web frameworks (CommonJS, Helma, Phobos, V8cgi), which seems obvious since it is already a language widely used for web development. But wait, everything is so new and nothing is really mature. However JS is around for almost 15 years, being as powerfull as any other scripting languages, being standardised by the ECMA, and being a mandatory technology for web development. Why did it take so much time to gain acceptance into other domains than web browsers?

    Read the article

  • Is there anything for Python that is like readability.js?

    - by Emre Sevinç
    Hi, I'm looking for a package / module / function etc. that is approximately the Python equivalent of Arc90's readability.js http://lab.arc90.com/experiments/readability http://lab.arc90.com/experiments/readability/js/readability.js so that I can give it some input.html and the result is cleaned up version of that html page's "main text". I want this so that I can use it on the server-side (unlike the JS version that runs only on browser side). Any ideas? PS: I have tried Rhino + env.js and that combination works but the performance is unacceptable it takes minutes to clean up most of the html content :( (still couldn't find why there is such a big performance difference).

    Read the article

  • application authentication design ideas

    - by Berryl
    Hello I am working with on an app that uses wpf / silverlight on the front end and nhibernate on the back end, and looking for some design ideas to address authentication; I was looking at Rhino Security which I think is pretty slick and certainly useful, but doesn't in and of itself seem to address authentication. That said, I am looking for something of a technology agnostic overview of authentication design issues at this point. Does anyone have any links and / or experiences with an authentication design that is relatively easy to adapt to different common technologies. Cheers, Berryl

    Read the article

  • Should I practice "mockist" or "classical" TDD?

    - by Daryl Spitzer
    I've read (and re-read) Martin Fowler's Mocks Aren't Stubs. In it, he defines two different approaches to TDD: "Classical" and "Mockist". He attempts to answer the question "So should I be a classicist or a mockist?", but he admits that he has never tried mockist TDD on "anything more than toys." So I thought I'd ask the question here. Good answers may repeat Fowler's arguments (but hopefully more clearly) or add arguments that he didn't think of or that others have come up with since Fowler last updated the essay back in January 2007.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >