public void DeleteWeight_UriNotValid_ArgumentException() { //Arrange var validPath = "/test/"; Mock <AccessTokenManagerBaseStub> tokenManager = new Mock <AccessTokenManagerBaseStub>(); WeightEndpoint weightRequest = new WeightEndpoint(tokenManager.Object, new UsersModel { Weight = validPath }); //Act and Assert Assert.Throws(typeof(ArgumentException), () => { weightRequest.DeleteWeight("Not validPath."); }); }
public void DeleteWeight_UriValid_DoesNotThrowArgumentException() { //Arrange var validPath = "/test/"; Mock <AccessTokenManagerBaseStub> tokenManager = new Mock <AccessTokenManagerBaseStub>(); WeightEndpoint weightRequest = new WeightEndpoint(tokenManager.Object, new UsersModel { Weight = validPath }); //Act and Assert Assert.DoesNotThrow(() => { weightRequest.DeleteWeight(validPath); }); }