public void ReturnMaxPageSizeOfBadIntergerFormatShouldThrow()
 {
     this.requestMessage.SetHeader(PreferHeaderName, string.Format("{0}=abc", MaxPageSizePreference));
     this.preferHeader = new ODataPreferenceHeader(this.requestMessage);
     int? maxPageSize;
     Action test = () => maxPageSize = this.preferHeader.MaxPageSize;
     test.ShouldThrow<FormatException>().WithMessage("Input string was not in a correct format.");
 }
 public void TestInit()
 {
     this.requestMessage = new InMemoryMessage();
     this.preferHeader = new ODataPreferenceHeader(this.requestMessage);
 }
 public void ReturnWaitOfBadIntergerFormatShouldThrow()
 {
     this.requestMessage.SetHeader(PreferHeaderName, "wait=abc");
     this.preferHeader = new ODataPreferenceHeader(this.requestMessage);
     int? wait;
     Action test = () => wait = this.preferHeader.Wait;
     test.ShouldThrow<FormatException>().WithMessage("Input string was not in a correct format.");
 }