示例#1
0
        public void Constructor_UnknownStatusCode_SetsUnknownStatusCode()
        {
            var statusCode = "NONEXISTENT_STATUS_CODE";

            var message = new StatusMessage(statusCode, null);

            message.ShouldSatisfyAllConditions(
                () => message.StatusCode.ShouldBe(GpgStatusCode.UnknownStatusCode),
                () => message.RawStatusCode.ShouldBe(statusCode)
                );
        }
示例#2
0
        public void Constructor_SetsProperties()
        {
            var statusCode  = "SUCCESS";
            var messageText = "message";

            var message = new StatusMessage(statusCode, messageText);

            message.ShouldSatisfyAllConditions(
                () => message.StatusCode.ShouldBe(GpgStatusCode.SUCCESS),
                () => message.RawStatusCode.ShouldBe(statusCode),
                () => message.Message.ShouldBe(messageText)
                );
        }