Example #1
0
        public void POST_GoodData_OkResult()
        {
            var request = _eventType.Post(NewEventType()) as OkObjectResult;
            var result = (int)request.Value;

            result.Should().BeGreaterThan(0);
        }
Example #2
0
        public void EventTypeControllerPostTest()
        {
            // Arrange
            controller = new EventTypeController(_eventTypeRepository);
            var eventTypeDescription = "Celebration";
            var newEventType = new EventTypeDto() { Description = eventTypeDescription };

            // Act
            var result = controller.Post(newEventType) as ObjectResult;

            // Assert
            Assert.AreEqual(eventTypeDescription, ((EventTypeDto)result.Value).Description);
        }