コード例 #1
0
 public void RemoveTest()
 {
     IFormsAuthentication formsAuthentication = null; // TODO: Initialize to an appropriate value
     IAddressService addressService = null; // TODO: Initialize to an appropriate value
     AddressController target = new AddressController(formsAuthentication, addressService); // TODO: Initialize to an appropriate value
     JsonResult expected = null; // TODO: Initialize to an appropriate value
     JsonResult actual;
     actual = target.Remove();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #2
0
        public void ShouldBeAbleToRemoveDeliveryAddress()
        {
            // arrange
            var controller = new AddressController(this.formsAuthentication, this.addressService);
            const int AddressIdToRemove = 1;

            // act
            var actual = controller.Remove(AddressIdToRemove) as JsonNetResult;

            // assert
            Assert.That(actual, Is.Not.Null);
            Debug.Assert(actual != null, "actual != null");
            var model = actual.Data as DeliveryAddressViewModel;
            Debug.Assert(model != null, "model != null");
            Assert.That(model.MessageType, Is.EqualTo("Success"));
            Assert.That(model.Id, Is.EqualTo(1));
        }