public void GetValueReturnsTheUtf8DecodedValueOfTheValueProperty() { string utf8 = GetUtf8(); var unprotectedValue = new UnprotectedUtf8Value { Value = utf8 }; Assert.Equal(Encoding.UTF8.GetBytes(utf8), unprotectedValue.GetValue()); }
public void VerifyValueGetterAndSetterBehavior() { string utf8 = GetUtf8(); var unprotectedValue = new UnprotectedUtf8Value() { Value = utf8 }; Assert.Equal(utf8, unprotectedValue.Value); }
public void GetValueThrowsInvalidOperationExceptionWhenUninitialized() { var unprotectedValue = new UnprotectedUtf8Value(); Assert.Throws <InvalidOperationException>(() => unprotectedValue.GetValue()); }
public void PassingNullToValuePropertyThrowsArgumentNullException() { var unprotectedValue = new UnprotectedUtf8Value(); Assert.Throws <ArgumentNullException>(() => unprotectedValue.Value = null); }
public void ValueIsNullWhenUninitialized() { var unprotectedValue = new UnprotectedUtf8Value(); Assert.Null(unprotectedValue.Value); }