public void GetLayout_WithRawPropertyLayoutAttribute_ShouldReturnRawPropertyLayout() { // Arrange var sut = new LayoutAdapterProvider(); var attribute = new RawPropertyLayoutAttribute("log4net:HostName"); // Act var result = sut.GetLayout(attribute); // Assert Assert.IsInstanceOfType(result, typeof(RawPropertyLayout)); }
public void GetLayout_WithNullAttribute_ShouldReturnNull() { // Arrange var sut = new LayoutAdapterProvider(); LayoutAttribute attribute = null; // Act var result = sut.GetLayout(attribute); // Assert Assert.IsNull(result); }
public void GetLayout_WithRawUtcTimeStampLayoutAttribute_ShouldReturnRawUtcTimeStampLayout() { // Arrange var sut = new LayoutAdapterProvider(); var attribute = new RawUtcTimeStampLayoutAttribute(); // Act var result = sut.GetLayout(attribute); // Assert Assert.IsInstanceOfType(result, typeof(RawUtcTimeStampLayout)); }
public void GetLayout_WithDynamcPatternLayoutAttribute_ShouldReturnLayout2RawLayout() { // Arrange var sut = new LayoutAdapterProvider(); var attribute = new DynamicPatternLayoutAttribute() { Pattern = "%message" }; // Act var result = sut.GetLayout(attribute); // Assert Assert.IsInstanceOfType(result, typeof(Layout2RawLayoutAdapter)); }