public void ThrowIfNumberIsNegative_InnerTestClass_ThrowException() { var cls = new TestClass(); This.Action(() => cls.Execute(-2)).Throws <ArgumentException>(); }
public void CheckLink_NullAsLink() { var utils = GetMockedUtilsCategory("", ""); This.Action(() => utils.CheckLink(null)).Throws <ArgumentNullException>(); }
public void GetCountries_OffsetIsNegative_ThrowArgumentException() { var db = GetMockedDatabaseCategory("", ""); This.Action(() => db.GetCountries(offset: -2)).Throws <ArgumentException>(); }
public void Send_EmptyMessage_ThrowsInvalidParameterException() { This.Action(() => Cat.Send(1, false, "")).Throws <ArgumentException>(); }
public void DeleteDialog_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.DeleteDialog(111, false)).Throws <AccessTokenInvalidException>(); }
public void GetChatUsers_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.GetChatUsers(2)).Throws <AccessTokenInvalidException>(); }
public void GetLongPollServer_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.GetLongPollServer()).Throws <AccessTokenInvalidException>(); }
public void AreFriends_EmptyAccessToken_ThrowAccessTokenInvalidException() { var f = new FriendsCategory(new VkApi()); This.Action(() => f.AreFriends(new long[] { 2, 3 })).Throws <AccessTokenInvalidException>(); }
public void Get_EmptyAccessToken_ThrowAccessTokenInvalidException() { var f = new FriendsCategory(new VkApi()); This.Action(() => f.Get(1)).Throws <AccessTokenInvalidException>(); }
public void ThrowIfNumberNotInRange_LessThenMin_ThrowsException() { This.Action(() => VkErrors.ThrowIfNumberNotInRange(2, 5, 10)).Throws <ArgumentOutOfRangeException>(); }
public void ThrowIfNumberNotInRange_MoreThanMax_ThrowsException() { This.Action(() => VkErrors.ThrowIfNumberNotInRange(12, 5, 10)).Throws <ArgumentOutOfRangeException>(); }
public void Set_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var status = new StatusCategory(new VkApi()); This.Action(() => status.Set("test")).Throws <AccessTokenInvalidException>(); }
public void GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.GetLastActivity(1)).Throws <AccessTokenInvalidException>(); }
public void Send_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.Send(1, false, "Привет, Паша!")).Throws <AccessTokenInvalidException>(); }
public void CreateChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.CreateChat(new ulong[] { 1, 2 }, "hi, friends")).Throws <AccessTokenInvalidException>(); }
public void AddList_NameIsEmpty_ThrowException() { FriendsCategory cat = GetMockedFriendsCategory("", ""); This.Action(() => cat.AddList("")).Throws <ArgumentNullException>(); }
public void EditChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.EditChat(2, "new title")).Throws <AccessTokenInvalidException>(); }
public void EditList_ListIdIsNegative_ThrowException() { FriendsCategory cat = GetMockedFriendsCategory("", ""); This.Action(() => cat.EditList(-1)).Throws <ArgumentException>(); }
public void RemoveChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.RemoveChatUser(2, 2)).Throws <AccessTokenInvalidException>(); }
public void GetCities_RegionIdIsNegative_ThrowException() { var db = GetMockedDatabaseCategory("", ""); This.Action(() => db.GetCities(1, -2)).Throws <ArgumentException>(); }
public void SearchDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.SearchDialogs("hello")).Throws <AccessTokenInvalidException>(); }
public void GetRegions_CountryIdIsNegative_ThrowArgumentException() { DatabaseCategory db = GetMockedDatabaseCategory("", ""); This.Action(() => db.GetRegions(-1)).Throws <ArgumentException>(); }
public void Delete_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.Delete(new ulong[] { 1 })).Throws <AccessTokenInvalidException>(); }
public void GetRegions_OffsetIsNegative_ThrowArgumentException() { DatabaseCategory db = GetMockedDatabaseCategory("", ""); This.Action(() => db.GetRegions(1, offset: -2)).Throws <ArgumentException>(); }
public void MarkAsNew_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.MarkAsNew(1)).Throws <AccessTokenInvalidException>(); }
public void ResolveScreenName_EmptyStringName_ThrowException() { var utils = GetMockedUtilsCategory("", ""); This.Action(() => utils.ResolveScreenName(string.Empty)).Throws <ArgumentNullException>(); }