public void WhenOnGetAndNameEmptyThrowArgumentNullException() { // Arrange var model = new SampleModel(_configuration); // Assert Assert.Throws <ArgumentNullException>( () => model.OnGet(string.Empty)); }
public void WhenOnGet() { // Arrange var model = new SampleModel(_configuration); // Act model.OnGet("Environment"); // Assert Assert.IsNotNull(model.Value); Assert.AreEqual(model.Value, "Local"); }