Esempio n. 1
0
        public void CreateNotifierForAppleExecutesMultipartFormDataRequestWithCorrectParameters()
        {
            IRestResponse restResponse = Helpers.SetUpRestResponse(HttpStatusCode.OK);

            _request.ExecuteMultipartFormDataRequest(Arg.Any <string>(), Arg.Any <Method>(), Arg.Any <IDictionary <string, object> >(), Arg.Any <IDictionary <string, string> >())
            .Returns(restResponse);

            _notificationsManager.CreateNotifierForApple("notifierName", "development", @"C:\filePath");

            _request.Received(1).ExecuteMultipartFormDataRequest(
                "/notifiers",
                Method.POST,
                Arg.Is <IDictionary <string, object> >(d => (string)d["name"] == "notifierName" && (string)d["provider"] == "apple" && (string)d["environment"] == "development"),
                Arg.Is <IDictionary <string, string> >(d => d["p12Certificate"] == @"C:\filePath"));
        }