コード例 #1
0
        public void EmptyLogin_ThrowsException()
        {
            b.Info.Flow();
            string        userName = string.Empty;
            Authorisation a        = new Authorisation();

            Assert.Throws <ArgumentOutOfRangeException>(() => {
                a.IsValid(userName);
            });
        }
コード例 #2
0
        public void KnownBadLogin_Rejected()
        {
            b.Info.Flow();
            string userName = "******";
            bool   loggedIn = false;

            Authorisation a = new Authorisation();

            loggedIn = a.IsValid(userName);

            Assert.False(loggedIn, "Bad UserName Must Not Login");
        }
コード例 #3
0
        public void NullLogin_ThrowsException()
        {
            b.Info.Flow();

            string        userName = string.Empty;
            Authorisation a        = new Authorisation();

            Assert.Throws <ArgumentNullException>(() => {
                // TODO : Implement Login Call here
                a.IsValid(userName);
            });
        }
コード例 #4
0
        public void KnownGoodLogin_Works()
        {
            b.Info.Flow();

            string userName = "******";
            bool   loggedIn = false;

            Authorisation a = new Authorisation();

            loggedIn = a.IsValid(userName);

            Assert.True(loggedIn, "Good UserName Must Login");
        }