public void ShouldBeAbleToSetLength()
        {
            const int expected = 9;
            var       service  = new InternetService(new DataManager(), new RandomNumberGenerator());

            service.GetPassword(expected).Length.ShouldBe(expected);
        }
        public void ShouldBeAbleToMakeLower()
        {
            var service  = new InternetService(new DataManager(), new RandomNumberGenerator());
            var actual   = service.GetPassword(casing: "lower");
            var expected = actual.ToLower();

            actual.ShouldMatch(expected);
        }
Esempio n. 3
0
 private string GetPasswordContext(int length = 8, string casing = "both")
 {
     return(_service.GetPassword(length, casing));
 }
        public void ShouldHaveDefaultLengthOfEight()
        {
            var service = new InternetService(new DataManager(), new RandomNumberGenerator());

            service.GetPassword().Length.ShouldBe(8);
        }
        public void ShouldReturnRandomPassword()
        {
            var service = new InternetService(new DataManager(), new RandomNumberGenerator());

            service.GetPassword().Length.ShouldBeGreaterThan(0);
        }