public void ApplXp_FailInvalidUser() { //Arrange var user = new XpModel { UserName = string.Empty, Xp = 123456, IntegrationsProvider = IntegrationsProviderTypes.GitHub }; //Act var response = _browser.Put("/api/tracking/", x => x.JsonBody(user)); //Assert response.StatusCode.ShouldEqual(HttpStatusCode.BadRequest); // _xpTracking.Verify(x => x.ApplyTracking(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>()), Times.Never); }
public void ApplXp_FailApplyFailure() { //Arrange var user = new XpModel { UserName = "******", Xp = 123456, IntegrationsProvider = IntegrationsProviderTypes.GitHub }; // _xpTracking.Setup(x => x.ApplyTracking(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>())).Returns(false); //Act var response = _browser.Put("/api/tracking/", x => x.JsonBody(user)); //Assert response.StatusCode.ShouldEqual(HttpStatusCode.BadRequest); // _xpTracking.Verify(x => x.ApplyTracking(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>()), Times.Once); }