public void TyrParse_Null_IsInvalid() { StreamSize val; string str = null; Assert.IsFalse(StreamSize.TryParse(str, out val)); }
public void TyrParse_StringEmpty_IsInvalid() { StreamSize val; string str = string.Empty; Assert.IsFalse(StreamSize.TryParse(str, out val)); }
public void TyrParse_StringValue_IsValid() { string str = "17kb"; Assert.IsTrue(StreamSize.TryParse(str, out StreamSize val), "Valid"); Assert.AreEqual("17000 byte", val.ToString(), "Value"); }
public void TryParse_InvalidInput_DefaultValue() { using (new CultureInfoScope("en-GB")) { var exp = default(StreamSize); var act = StreamSize.TryParse("InvalidInput"); Assert.AreEqual(exp, act); } }
public void TryParse_TestStructInput_AreEqual() { using (new CultureInfoScope("en-GB")) { var exp = TestStruct; var act = StreamSize.TryParse(exp.ToString()); Assert.AreEqual(exp, act); } }