Beispiel #1
0
        public void CreateNotifierForAndroidExecutesMultipartFormDataRequestWithCorrectParameters()
        {
            IRestResponse restResponse = Helpers.SetUpRestResponse(HttpStatusCode.OK);

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

            _notificationsManager.CreateNotifierForAndroid("notifierName", "apiKey");

            _request.Received(1).ExecuteJsonRequest(
                "/notifiers",
                Method.POST,
                Arg.Is <AndroidNotifierPayload>(p => p.ApiKey == "apiKey" && p.Name == "notifierName" && p.Provider == "google"));
        }