private static StringsMessage GetStringsMessage(bool isAlfaBravoStatusA, string inputText)
 {
     var alfaBravoStatus = isAlfaBravoStatusA ? AlfaBravoStatus.A : AlfaBravoStatus.B;
     var stringsMessage = new StringsMessage
         {
             AlfaBravoStatus = alfaBravoStatus,
             SomeText = inputText
         };
     return stringsMessage;
 }
        public void Post(AlfaBravoStatus alfaBravoStatus)
        {
            httpControllerContext.Request.Method = HttpMethod.Post;
            var stringsMessage = new StringsMessage
                                            {
                                                SomeText = "some text",
                                                AlfaBravoStatus = alfaBravoStatus
                                            };
            httpActionContext.ActionArguments.Add("strings", stringsMessage);

            attribute.OnActionExecuting(httpActionContext);

            Assert.That(CurrentUser.AlfaBravoStatusStore.AlfaBravoStatus, Is.EqualTo(alfaBravoStatus));
        }
Ejemplo n.º 3
0
 public string Post(StringsMessage strings)
 {
     return GetResponseText("POST", strings.SomeText);
 }