示例#1
0
 public void Indicate_the_duplicated_key_in_the_exception()
 {
     try
      {
     Request request = new Request();
     request.SetItem("key1", "bob");
     request.SetItem("key1", "steve");
     Assert.Fail();
      }
      catch (RequestItemAlreadySetException ex)
      {
     Assert.AreEqual("key1", ex.Key);
      }
 }
示例#2
0
 public void Throw_an_exception_when_there_is_an_existing_type_key()
 {
     Request request = new Request();
      request.SetItem("bob");
      request.SetItem("steve");
 }
示例#3
0
 public void Throw_an_exception_when_there_is_an_existing_developer_provided_key()
 {
     Request request = new Request();
      request.SetItem("key1", "bob");
      request.SetItem("key1", "steve");
 }
示例#4
0
 protected override void Before_each_spec()
 {
     _request = new Request();
      _key = "test";
      _request.SetItem(_key, Guid.NewGuid());
 }