public void Can_Create_DashBoard() { UserDashboard userDashboard = new UserDashboard { Id = "userName", Views = new List<DashboardView> { new DashboardView { PageComponents = new List<PageComponent> { new PageComponent { DataviewId = "r1c1", // Row 1 column 1 Visualizer = new Visualizer { Type = "Tabular", Settings = new Settings { RecordSchema = new Schema.RecordDescriptorRef { RecordSchemaId = "RecordSchemas/1" // PersonSchema }, DisplayFields = new List<string> { "Name", "Age" } } }, } } } } }; var json = JsonConvert.SerializeObjectAsync(userDashboard).Result; var controller = new DashboardController(session); Helpers.SetupControllerContext(controller, HttpMethod.Put); var response = controller.Put(userDashboard); Assert.IsNotNull(response.Headers.Location.AbsoluteUri); }