public void Should_WriteEvent_When_EventEnumIsProvided() { var mockWriter = Mock.Of <JsonWriter>(); var sut = new InsightTypeInsightsConverter(); sut.WriteJson(mockWriter, InsightType.Event, new JsonSerializer()); Mock.Get(mockWriter).Verify(mock => mock.WriteValue((object)"EVENT"), Times.Once); }
public void Should_WriteNull_When_NullObjectIsProvided() { var mockWriter = Mock.Of <JsonWriter>(); var sut = new InsightTypeInsightsConverter(); sut.WriteJson(mockWriter, null, new JsonSerializer()); Mock.Get(mockWriter).Verify(mock => mock.WriteNull(), Times.Once); }
public void Should_ReturnFalse_When_EnumIsProvided() { var sut = new InsightTypeInsightsConverter(); Assert.IsFalse(sut.CanConvert(typeof(Enum))); }
public void Should_ReturnTrue_When_InsightTypeEnumIsProvided() { var sut = new InsightTypeInsightsConverter(); Assert.IsTrue(sut.CanConvert(typeof(InsightType))); }