Exemple #1
0
        public void Add_ValidObjectPassed_ReturnsCreatedResponse()
        {
            // Arrange
            Mobile testItem = new Mobile()
            {
                Name        = "apple",
                ActualPrice = 15000,
                CompanyName = "xyz",
                Description = "xxx",
                ImeiNumber  = "1234566",
                LauchDate   = System.DateTime.Now,
                UpatedDate  = System.DateTime.Now,
                CraetedDate = System.DateTime.Now
            };
            // Act
            var createdResponse = _MobiileController.AddMobile(testItem);

            // Assert
            Assert.IsType <CreatedAtActionResult>(createdResponse);
        }