Exemple #1
0
        public void TestPost_RecordSuccessfullyCreated()
        {
            var eventId = "some-event-id";
            WasteManagementEvent exceptionModel = _testData.CreateExceptionModel();

            exceptionModel.Vin = eventId;

            var result = _controller.Create(exceptionModel);

            _dbSetMock.Verify(mock => mock.Add(It.IsAny <WasteManagementEventEntity>()), Times.Once());
            _dbContextMock.Verify(mock => mock.SaveChanges(), Times.Once());
            Assert.AreEqual(typeof(StatusCodeResult), result.GetType());
        }