Ejemplo n.º 1
0
        public void Features_AddNotification()
        {
            var anNotification = new Notification
            {
                Id = 0
            };

            // Set test Create method w/o parameters
            request.Setup(m => m.Post <Response <Notification> >("features/666/notifications", anNotification, null)).Returns(new Response <Notification>
            {
                Data = new Notification
                {
                    Id = 1234
                }
            });

            // Test Get method
            var result = featuresProxy.AddNotification(666, anNotification);

            // Verify test
            Assert.IsNotNull(result);
            Assert.IsTrue(result.IsSuccessful);
            Assert.AreEqual(1234, result.Data.Id);
        }