Update() public method

public Update ( dynamic, item ) : PageModel,
item dynamic,
return PageModel,
Example #1
0
    public void Update_Should_Validate_Title()
    {
        dynamic data = new ExpandoObject();

        data.Id    = "id";
        data.Title = null; // <-- it should catch this
        var repository = new Mock();
        var model      = new PageModel();

        model.Repository = repository;
        model.Update(data);
        Assert.IsTrue(model.HasError);
    }
Example #2
0
 public void Update_Should_Validate_Title()
 {
     dynamic data = new ExpandoObject();
     data.Id = "id";
     data.Title = null; // <-- it should catch this
     var repository = new Mock();
     var model = new PageModel();
     model.Repository = repository;
     model.Update(data);
     Assert.IsTrue(model.HasError);
 }