Esempio n. 1
0
        public async Task _BadArgs()
        {
            try
            {
                await store.LogActivity(null);

                Assert.Fail("LogActivity Should have thrown on null ");
            }
            catch (ArgumentNullException) { }
            catch { Assert.Fail("LogActivity Should have thrown ArgumentNull exception on null "); }

            try
            {
                await store.GetTranscriptActivities(null, null);

                Assert.Fail("GetConversationActivities Should have thrown on null");
            }
            catch (ArgumentNullException) { }
            catch { Assert.Fail("DeleteConversation Should have thrown ArgumentNull "); }

            try
            {
                await store.GetTranscriptActivities("asdfds", null);

                Assert.Fail("GetConversationActivities Should have thrown on null");
            }
            catch (ArgumentNullException) { }
            catch { Assert.Fail("DeleteConversation Should have thrown ArgumentNull "); }

            try
            {
                await store.ListTranscripts(null);

                Assert.Fail("ListConversations Should have thrown on null");
            }
            catch (ArgumentNullException) { }
            catch { Assert.Fail("ListConversations Should have thrown ArgumentNull "); }

            try
            {
                await store.DeleteTranscript(null, null);

                Assert.Fail("DeleteConversation Should have thrown on null channelId");
            }
            catch (ArgumentNullException) { }
            catch { Assert.Fail("DeleteConversation Should have thrown ArgumentNull on channelId"); }

            try
            {
                await store.DeleteTranscript("test", null);

                Assert.Fail("DeleteConversation Should have thrown on null conversationId");
            }
            catch (ArgumentNullException) { }
            catch { Assert.Fail("DeleteConversation Should have thrown ArgumentNull on conversationId"); }
        }