public void MembersSanityTest() { var member = new MemberDto() { Name = "John Doe", PhoneNumber = "6042721430", LastLatitude = 0, LastLongitude = 0 }; int id = jsonApi.StoreMember(member); Assert.IsNotNull(id); Assert.IsTrue(id > 0); var returnedMember = jsonApi.GetMemberById(id); Assert.AreEqual(member.Name, returnedMember.Name); jsonApi.SetMemberLocation(id, 50, 25); jsonApi.CreateMemberShip(id); returnedMember = jsonApi.GetMemberById(id); Assert.AreEqual(50, returnedMember.LastLatitude); Assert.AreEqual(25, returnedMember.LastLongitude); Assert.IsNotNull(returnedMember.Membership); }
public int StoreMember(MemberDto member) { var request = new CreateMemberRequest(baseUrl, member); String response = requester.Put<MemberDto>(request); return Convert.ToInt32(response); }