Negotiator CreateNewGroup(string rootPath, IGroup partialGroup) { GroupsCollection.AddGroup(new Group { Name = partialGroup.Name }); dynamic data = new ExpandoObject(); data.Groups = GroupsCollection.Groups; return(Negotiate.WithStatusCode(HttpStatusCode.Created).WithView(rootPath + "/" + Constants.ViewNameGroups).WithModel((ExpandoObject)data).WithFullNegotiation()); }
public void GetGroup() { // GroupsCollection.Groups.Clear(); GroupsCollection.Clear(); var @group = GivenNewGroup(Name02); @group.Id = _guid02; GroupsCollection.AddGroup(@group); WhenGettingGroup(_guid02); ThenThereIsGroupLoadedFromTheGroupsCollection(@group); }