public async void User_can_order_widgets_in_an_area() { // Given two widgets w1 and w2 in blog-sidebar1 area var w1Id = await _svc.CreateWidgetAsync(MY_WIDGET_TYPE); await _svc.AddWidgetToAreaAsync(w1Id, WidgetService.BlogSidebar1.Id, 0); var w2Id = await _svc.CreateWidgetAsync(MY_WIDGET_TYPE); await _svc.AddWidgetToAreaAsync(w2Id, WidgetService.BlogSidebar1.Id, 1); // When user moves w1 below w2 await _svc.OrderWidgetInAreaAsync(w1Id, WidgetService.BlogSidebar1.Id, 1); // Then w1 is placed after w2 var area = await _svc.GetAreaAsync(WidgetService.BlogSidebar1.Id); Assert.Equal(w1Id, area.WidgetIds[1]); Assert.Equal(w2Id, area.WidgetIds[0]); }