private static ShellCommandFencer CreateFencer() { Configuration conf = new Configuration(); conf.Set("in.fencing.tests", "yessir"); ShellCommandFencer fencer = new ShellCommandFencer(); fencer.SetConf(conf); return(fencer); }
public virtual void TestCommandAbbreviation() { Assert.Equal("a...f", ShellCommandFencer.Abbreviate("abcdef", 5)); Assert.Equal("abcdef", ShellCommandFencer.Abbreviate("abcdef", 6)); Assert.Equal("abcdef", ShellCommandFencer.Abbreviate("abcdef", 7)); Assert.Equal("a...g", ShellCommandFencer.Abbreviate("abcdefg", 5)); Assert.Equal("a...h", ShellCommandFencer.Abbreviate("abcdefgh" , 5)); Assert.Equal("a...gh", ShellCommandFencer.Abbreviate("abcdefgh" , 6)); Assert.Equal("ab...gh", ShellCommandFencer.Abbreviate("abcdefgh" , 7)); }