Esempio n. 1
0
        public void OnCommand_ReturnsSaslOutcomeOk_WhenCommandSaslInit()
        {
            var outcome = default(SaslOutcome);
            var profile = new AzureSaslProfileProxy();

            DescribedList result = profile.CallOnCommand(new SaslInit());

            result.ShouldSatisfyAllConditions(
                () => outcome = result.ShouldBeOfType <SaslOutcome>(),
                () => outcome.Code.ShouldBe(SaslCode.Ok)
                );
        }
Esempio n. 2
0
        public void GetStartCommand_ReturnsSaslInitWithCorrectSettings()
        {
            var saslInit = default(SaslInit);
            var profile  = new AzureSaslProfileProxy();

            DescribedList command = profile.CallGetStartCommand("hostname1");

            command.ShouldSatisfyAllConditions(
                () => saslInit = command.ShouldBeOfType <SaslInit>(),
                () => saslInit.Mechanism.ShouldBe((Symbol)"MSSBCBS"),
                () => saslInit.InitialResponse.ShouldBe(Encoding.UTF8.GetBytes("MSSBCBS"))
                );
        }