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); } }
public void Throw_an_exception_when_there_is_an_existing_type_key() { Request request = new Request(); request.SetItem("bob"); request.SetItem("steve"); }
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"); }
protected override void Before_each_spec() { _request = new Request(); _key = "test"; _request.SetItem(_key, Guid.NewGuid()); }