Example #1
0
        public void WhenOnGetAndNameEmptyThrowArgumentNullException()
        {
            // Arrange
            var model = new SampleModel(_configuration);

            // Assert
            Assert.Throws <ArgumentNullException>(
                () => model.OnGet(string.Empty));
        }
Example #2
0
        public void WhenOnGet()
        {
            // Arrange
            var model = new SampleModel(_configuration);

            // Act
            model.OnGet("Environment");

            // Assert
            Assert.IsNotNull(model.Value);
            Assert.AreEqual(model.Value, "Local");
        }