Exemplo n.º 1
0
        public void CreateShouldReturnOkResultWithId()
        {
            this.aircraftsController.Configuration = new HttpConfiguration();

            var model = TestObjectFactoryDataTransferModels.GetValidAircraftRequesModel();

            this.aircraftsController.Validate(model);

            var result   = this.aircraftsController.Create(model);
            var okResult = result as OkNegotiatedContentResult <int>;

            Assert.IsNotNull(okResult);
            Assert.AreEqual(Constants.ENTITY_VALID_ID, okResult.Content);
        }