tests, docs from dev

This commit is contained in:
Kwoth
2016-10-10 00:44:50 +02:00
parent 51f02233c6
commit f468edbfc2
21 changed files with 922 additions and 778 deletions

View File

@ -140,7 +140,7 @@ namespace NadekoBot.Modules.Help
}
helpstr = helpstr.Replace(NadekoBot.Client.GetCurrentUser().Username , "@BotName");
#if DEBUG
File.WriteAllText("../../docs/commandslist.md", helpstr.ToString());
File.WriteAllText("../../docs/Commands List.md", helpstr.ToString());
#else
File.WriteAllText("commandlist.md", helpstr.ToString());
#endif

View File

@ -60,25 +60,25 @@ namespace Tests
Assert.Throws(typeof(IndexOutOfRangeException), () => { root.GetAt(10); });
}
[Fact]
public void InsertTest() {
//[Fact]
//public void InsertTest() {
var root = GetRoot();
// var root = GetRoot();
root.Insert(5, new Permission() { SecondaryTargetName = "in2" });
// root.Insert(5, new Permission() { SecondaryTargetName = "in2" });
Assert.Equal(11, root.Count());
Assert.Equal("in2", root.GetAt(5).SecondaryTargetName);
// Assert.Equal(11, root.Count());
// Assert.Equal("in2", root.GetAt(5).SecondaryTargetName);
root.Insert(0, new Permission() { SecondaryTargetName = "Inserted" });
// root.Insert(0, new Permission() { SecondaryTargetName = "Inserted" });
root = root.Previous;
Assert.Equal("Inserted", root.SecondaryTargetName);
Assert.Equal(12, root.Count());
Assert.Equal("Root", root.GetAt(1).SecondaryTargetName);
// root = root.Previous;
// Assert.Equal("Inserted", root.SecondaryTargetName);
// Assert.Equal(12, root.Count());
// Assert.Equal("Root", root.GetAt(1).SecondaryTargetName);
Assert.Throws(typeof(IndexOutOfRangeException), () => { root.GetAt(12); });
}
// Assert.Throws(typeof(IndexOutOfRangeException), () => { root.GetAt(12); });
//}
[Fact]
public void RemoveAtTest()