Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Fact]
- public async void GetProjectType_ReturnsNotFound_WhenIdIsOutOfRange()
- {
- var options = new DbContextOptionsBuilder<BlueInkDbContext>()
- .UseInMemoryDatabase("GetProjectType_ReturnsNotFound_WhenIdIsInvalid").Options;
- using var context = new BlueInkDbContext(options);
- context.ProjectTypes.Add(new ProjectType { Id = 1, Name = "Software" });
- context.SaveChanges();
- var controller = new ProjectTypesController(context);
- var result = (await controller.GetProjectType(2)) as NotFoundResult;
- Assert.NotNull(result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement