public void DebugItem_TruncateItemResultIfNeeded_With_ValueEqualToMaxCharDispatchCount_Expected_DoesNotInvokeSaveFile() { var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, DebugItem.MaxCharDispatchCount); var debugState = new DebugItemMock(); debugState.TruncateItemResultIfNeeded(item); Assert.AreEqual(0, debugState.SaveFileHitCount); }
public void DebugItem_TruncateItemResultIfNeeded_With_ValueEqualToMaxCharDispatchCount_Expected_DoesNotTruncateValueToActCharDispatchCount() { var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, DebugItem.MaxCharDispatchCount); var debugItem = new DebugItemMock(); debugItem.TruncateItemResultIfNeeded(item); Assert.AreEqual(DebugItem.MaxCharDispatchCount, item.Value.Length); }
// ReSharper disable InconsistentNaming - Unit Test public void TryCache_With_ValueEqualToMaxCharDispatchCount_Expected_DoesNotInvokeSaveFile() // ReSharper restore InconsistentNaming { var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, DebugItem.MaxCharDispatchCount); var debugState = new DebugItemMock(); debugState.TryCache(item); Assert.AreEqual(0, debugState.SaveFileHitCount); }
// ReSharper disable InconsistentNaming - Unit Test public void TryCache_With_ValueEqualToMaxCharDispatchCount_Expected_DoesNotTruncateValueToActCharDispatchCount() // ReSharper restore InconsistentNaming { var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, DebugItem.MaxCharDispatchCount); var debugItem = new DebugItemMock(); debugItem.TryCache(item); Assert.AreEqual(DebugItem.MaxCharDispatchCount, item.Value.Length); }
public void DebugItem_TruncateItemResultIfNeeded_With_ValueLessThanMaxCharDispatchCount_Expected_DoesNotTruncateValueToActCharDispatchCount() { const int ExpectedLength = 100; var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, ExpectedLength); var debugState = new DebugItemMock(); debugState.TruncateItemResultIfNeeded(item); Assert.AreEqual(ExpectedLength, item.Value.Length); }
public void DebugItem_TruncateItemResultIfNeeded_With_ValueGreaterThanMaxCharDispatchCount_Expected_InvokesSaveFileWithFullContent() { var item = CreateDebugItemWithLongValue(); var expectedContents = item.Value; var debugItem = new DebugItemMock(); debugItem.TruncateItemResultIfNeeded(item); Assert.AreEqual(1, debugItem.SaveFileHitCount); Assert.AreEqual(expectedContents, debugItem.SaveFileContents); }
// ReSharper disable InconsistentNaming - Unit Test public void TryCache_With_ValueLessThanMaxCharDispatchCount_Expected_DoesNotTruncateValueToActCharDispatchCount() // ReSharper restore InconsistentNaming { const int ExpectedLength = 100; var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, ExpectedLength); var debugState = new DebugItemMock(); debugState.TryCache(item); Assert.AreEqual(ExpectedLength, item.Value.Length); }
// ReSharper disable InconsistentNaming - Unit Test public void TryCache_With_ValueGreaterThanMaxCharDispatchCount_Expected_InvokesSaveFileWithFullContent() // ReSharper restore InconsistentNaming { var item = CreateDebugItemWithLongValue(); var expectedContents = item.Value; var debugItem = new DebugItemMock(); debugItem.TryCache(item); Assert.AreEqual(1, debugItem.SaveFileHitCount); Assert.AreEqual(expectedContents, debugItem.SaveFileContents); }
public void TryCache_With_ValueLessThanMaxCharDispatchCount_Expected_DoesNotInvokeSaveFile() { const int ExpectedLength = 100; var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, ExpectedLength); var debugState = new DebugItemMock(); debugState.TryCache(item); Assert.AreEqual(0, debugState.SaveFileHitCount); }
// ReSharper disable InconsistentNaming - Unit Test public void TryCache_With_ValueLessThanMaxCharDispatchCount_Expected_DoesNotInvokeSaveFile() // ReSharper restore InconsistentNaming { const int ExpectedLength = 100; var item = CreateDebugItemWithLongValue(); item.Value = item.Value.Substring(0, ExpectedLength); var debugState = new DebugItemMock(); debugState.TryCache(item); Assert.AreEqual(0, debugState.SaveFileHitCount); }