public void FromDictionary_WithError_Works() { var dict = new NSDictionary(); dict.Add("Request", "StartSession"); dict.Add("Error", "SessionInactive"); var response = new StartSessionResponse(); response.FromDictionary(dict); Assert.Equal("StartSession", response.Request); Assert.Equal(LockdownError.SessionInactive, response.Error); }
public void FromDictionary_Works() { var dict = new NSDictionary(); dict.Add("Request", "StartSession"); dict.Add("SessionID", "abc"); var response = new StartSessionResponse(); response.FromDictionary(dict); Assert.Equal("StartSession", response.Request); Assert.False(response.EnableSessionSSL); Assert.Equal("abc", response.SessionID); Assert.Null(response.Error); }
public void FromDictionary_ValidatesArguments() { var response = new StartSessionResponse(); Assert.Throws <ArgumentNullException>(() => response.FromDictionary(null)); }