public void SetData_ToTestValue_ToStringReturnsTestValue() { var objectUnderTest = new nsACString(); objectUnderTest.SetData("hello world"); Assert.AreEqual("hello world", objectUnderTest.ToString()); }
public void SetData_ToNull_ToStringReturnsNull() { var objectUnderTest = new nsACString(); objectUnderTest.SetData(null); Assert.AreEqual(null, objectUnderTest.ToString()); }
public void SetData_ToEmptyString_ToStringReturnsEmptyString() { var objectUnderTest = new nsACString(); objectUnderTest.SetData(String.Empty); Assert.AreEqual(String.Empty, objectUnderTest.ToString()); }
public void GetRawData_OfTestValue_ReturnsExpectedByteString() { var objectUnderTest = new nsACString(); objectUnderTest.SetData("hello world"); byte[] bytes = objectUnderTest.GetRawData(); Assert.AreEqual(new byte[] { 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100}, bytes); }
public void GetRawData_OfTestValue_ReturnsExpectedByteString() { var objectUnderTest = new nsACString(); objectUnderTest.SetData("hello world"); byte[] bytes = objectUnderTest.GetRawData(); Assert.AreEqual(new byte[] { 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100 }, bytes); }