Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9
This is the forum to discuss the Wrox book Professional ASP.NET MVC 1.0 by Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie; ISBN: 978-0-470-38461-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 24th, 2010, 01:21 PM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Default UpdateModel

when running this test the updateModel didn't return a result result is null

[TestMethod]
public void EditAction_Should_Redirect_When_Update_Successful( ) {

// Arrange
var controller = CreateDinnersControllerAs("SomeUser");
int id = 1;

FormCollection formValues = new FormCollection() {
{ "Title", "Another value" },
{ "Description", "Another description" }
};

controller.ValueProvider = formValues.ToValueProvider();

// Act
var result = controller.Edit(id, formValues) as RedirectToRouteResult;

// Assert
Assert.AreEqual("Details", result.RouteValues["Action"]);
Assert.AreEqual(id, result.RouteValues["id"]);
}
  #2 (permalink)  
Old February 27th, 2010, 06:43 AM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Default Problem solved

The updateModel problem was solved by un-installed MVC 2,
and install MVC 2 RC 2, this updated the Forms Collection get method.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 09:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.