public void and_no_password_THEN_result_is_insufficient_parameters()
        {
            var subject = new UserRegistrationService();
            var userRequest = new BuildUserRequest()
                .WithPassword("");

            var result = subject.RegisterUser(userRequest);

            result.Should().BeOfType<TooFewDataPassed>();
        }
        public void and_user_has_less_than_16_years_THEN_result_is_user_too_young()
        {
            var subject = new UserRegistrationService();
            var userData = new BuildUserRequest()
                .WithBirthDate("2010-10-01");

            var result = subject.RegisterUser(userData);

            result.Should().BeOfType<UserIsTooYoung>();

        }
        public void THEN_user_has_been_added()
        {
            UserAccountRequest userRequest = new BuildUserRequest().WithPhoneNumber("123456789");
            var subject = new UserRegistrationService();

            subject.RegisterUser(userRequest);

            subject.Users.Should().Contain(user => user.PhoneNumber == "123456789");

            Console.WriteLine(userRequest);
        }
        public void THEN_we_can_do_many_things_with_fluent_assertions()
        {
            var subject = new UserRegistrationService();
            var userData = new BuildUserRequest()
                .WithBirthDate("2010-10-01");

            var result = subject.RegisterUser(userData);

            subject.Invoking(x => x.RegisterUser(null)).ShouldThrow<NullReferenceException>();

            subject.ExecutionTimeOf(x => x.RegisterUser(userData)).ShouldNotExceed(new TimeSpan(0, 0, 1));
        }