Example #1
0
        public void when_no_username_then_error_is_no_username_error()
        {
            var conversation =
                new LoginConversation
            {
                Request = new LoginRequest
                {
                    Username = "******"
                }
            };

            new LoginConversationSpec()
            .GetSpec()
            .Run(conversation);

            conversation.Response.Message.ShouldEqual(Strings.NoPasswordError);
        }
Example #2
0
        public void when_username_and_password_then_message_is_success()
        {
            var conversation =
                new LoginConversation
            {
                Request = new LoginRequest
                {
                    Username = "******",
                    Password = "******"
                }
            };

            new LoginConversationSpec()
            .GetSpec()
            .Run(conversation);

            conversation.Response.Message.ShouldEqual(Strings.GoodLoginMessage);
        }