-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to use F# for an ASP.NET MVC application. One my controller actions sends an F# list to the view, so I write:
<%@ Page Language="C#" Inherits="ViewPage<FSharpList<int>>" %>
Of course, for this to work, I have to add Microsoft.FSharp.Collections to the namespaces element…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Here's my test code to isolate the problem:
open Microsoft.FSharp.Metadata
[<EntryPoint>]
let main args =
let core = FSharpAssembly.FromFile @"C:\Program Files\FSharp-2.0.0.0\\bin\FSharp.Core.dll"
let core2 = FSharpAssembly.FSharpLibrary
let core3 = System.AppDomain.CurrentDomain.GetAssemblies()…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi, I have this monstrous f# 2.0 program
My mono version is
Mono JIT compiler version 2.9 (master/f593354 Sun Dec 26 03:15:55 EET 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture:…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to deploy a web application which uses F# 4.0 on Windows Server 2008.
It works on my computer where VS2010 is installed but it doesn't work on the server. Everytime you open the page you'll get this error message:
Could not load file or assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm using FSharp.Compiler.CodeDom to dynamically create F# classes. The problem is, that I have both VS2008 and VS2010 on my computer side-by-side (they works fine), and using F# in this configuration is buggy at best:
If I don't install InstallFSharp.msi, then under VS2008 the built classes complain…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
I'm trying to return an object when mocking a parser class. This is the test code using PHPUnit 3.7
//set up the result object that I want to be returned from the call to parse method
$parserResult= new ParserResult();
$parserResult->setSegment('some string');
//set up…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm little confused with Cactus and mock objects (jMock, Easy mock).
Could anyone please answer the following questions?
When to use Cactus for testing?
When not to use Cactus for testing?
When to use mock objects for testing?
When not to use mock objects for testing?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have this factory class and I want to test it correctly. Let's say I have an abstract class which have many child (inheritance).
As you can see in my Factory class the method BuildChild, I want to be able to create an instance of a child class at Runtime. I must be able to create this instance…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm using the mock-0.6 library from http://www.voidspace.org.uk/python/mock/mock.html to mock out a framework for testing, and I want to have a mock method return a series of values, each time it's called.
Right now, this is what I figured should work:
def returnList(items):
def sideEffect(*args…
>>> More
-
as seen on ASP.net Weblogs
- Search for 'ASP.net Weblogs'
In this post, i will be showing how you can mock property sets with your expected values or even action using JustMock. To begin, we have a sample interface: public interface IFoo { int Value { get; set; } } Now, we can create a mock that will throw on any call other than the one…
>>> More