public async Task Test_New_Horses_Saved()
        {
            var horse = new Horse {
                Name = "Horse 1"
            };

            await controller.Create(horse);

            horses.Verify(x => x.Add(horse), Times.Once);
            context.Verify(x => x.SaveChangesAsync(), Times.Once);
        }
Example #2
0
 public void ItAcceptsHorseCreate()
 {
     // Arrange
     // Act
     _controller.Create(_horse);
 }