コード例 #1
0
        public void ShouldCompletePasswordResetAsync()
        {
            // Arrange
            IUserApi userApi = CreateUserApi("complete");

            // Act
            bool ok = userApi.CompletePasswordResetAsync("*****@*****.**", "qwerty", answer: "maybe").Result;

            // Assert
            ok.ShouldBe(true);

            Should.Throw <ArgumentNullException>(() => userApi.CompletePasswordResetAsync(null, "qwerty", answer: "maybe"));
            Should.Throw <ArgumentNullException>(() => userApi.CompletePasswordResetAsync("*****@*****.**", null, answer: "maybe"));
            Should.Throw <ArgumentException>(() => userApi.CompletePasswordResetAsync("*****@*****.**", "qwerty", answer: "maybe", code: "not"));
        }
コード例 #2
0
        public void ShouldCompletePasswordResetAsync()
        {
            // Arrange
            IUserApi userApi = CreateUserApi("complete");

            // Act
            bool ok = userApi.CompletePasswordResetAsync("*****@*****.**", "qwerty", answer: "maybe").Result;

            // Assert
            ok.ShouldBe(true);
        }