public void NothingElseCalled_PopupsReturned() { //Arrange SandboxDirectiveBuilder builder = new SandboxDirectiveBuilder(); //Act builder.AllowPopups(); //Assert string result = builder.Build(); Assert.Equal("allow-popups", result); }
public void DuplicatePopupsAllowed_DuplicatesRemoved() { //Arrange SandboxDirectiveBuilder builder = new SandboxDirectiveBuilder(); //Act builder.AllowPopups().AllowPopups(); //Assert string result = builder.Build(); Assert.Equal("allow-popups", result); }
public void SomethingElseCalled_SameOriginIncluded() { //Arrange SandboxDirectiveBuilder builder = new SandboxDirectiveBuilder(); //Act builder.AllowModals(); builder.AllowSameOrigin(); builder.AllowPopups(); //Assert string result = builder.Build(); Assert.Equal("allow-modals allow-popups allow-same-origin", result); }
public void SomethingElseCalled_PopupsIncluded() { //Arrange SandboxDirectiveBuilder builder = new SandboxDirectiveBuilder(); //Act builder.AllowModals(); builder.AllowPopups(); builder.AllowForms(); //Assert string result = builder.Build(); Assert.Equal("allow-forms allow-modals allow-popups", result); }
public void SomethingElseCalled_TopNavigationIncluded() { //Arrange SandboxDirectiveBuilder builder = new SandboxDirectiveBuilder(); //Act builder.AllowModals(); builder.AllowTopNavigation(); builder.AllowPopups(); //Assert string result = builder.Build(); Assert.Equal("allow-modals allow-popups allow-top-navigation", result); }