public ClassScheduling()
		{
			// create a bunch of random classes
			var levels = new[] { "intro", "for dummies", "remedial", "101", "201", "301", "mastery", "lab", "seminar" };
			var types = new[] { "chem", "bio", "cs", "geometry", "calc", "alg", "film", "music", "art", "dance" };
			var times = Enumerable.Range(2, 20).Select(h => h.ToString() + ":00").ToArray();

			this.ClassNames = times
				.SelectMany((h) => types.Select(t => h + " " + t))
				.SelectMany((s) => levels.Select((l) => s + " " + l))
				.ToArray();
		}
		public async Task Test_Remove_Folder()
		{
			using (var db = await OpenTestDatabaseAsync())
			{
				var location = db.Partition.ByKey("DL");
				await db.ClearRangeAsync(location, this.Cancellation);
				var directory = FdbDirectoryLayer.Create(location);

#if ENABLE_LOGGING
				var list = new List<FdbTransactionLog>();
				var logged = new FdbLoggedDatabase(db, false, false, (tr) => { list.Add(tr.Log); });
#else
				var logged = db;
#endif

				// RemoveAsync

				string[] path = new[] { "CrashTestDummy" };
				await directory.CreateAsync(logged, path, this.Cancellation);
#if DEBUG
				await DumpSubspace(db, location);
#endif

				// removing an existing folder should succeeed
				await directory.RemoveAsync(logged, path, this.Cancellation);
#if DEBUG
				await DumpSubspace(db, location);
#endif
				//TODO: call ExistsAsync(...) once it is implemented!

				// Removing it a second time should fail
				Assert.Throws<InvalidOperationException>(async () => await directory.RemoveAsync(logged, path, this.Cancellation), "Removing a non-existent directory should fail");

				// TryRemoveAsync

				await directory.CreateAsync(logged, path, this.Cancellation);

				// attempting to remove a folder should return true
				bool res = await directory.TryRemoveAsync(logged, path, this.Cancellation);
				Assert.That(res, Is.True);

				// further attempts should return false
				res = await directory.TryRemoveAsync(logged, path, this.Cancellation);
				Assert.That(res, Is.False);

				// Corner Cases

				// removing the root folder is not allowed (too dangerous)
				Assert.Throws<InvalidOperationException>(async () => await directory.RemoveAsync(logged, new string[0], this.Cancellation), "Attempting to remove the root directory should fail");

#if ENABLE_LOGGING
				foreach (var log in list)
				{
					Console.WriteLine(log.GetTimingsReport(true));
				}
#endif
			}
		}
		public void Test_Slice_JoinBytes()
		{
			var sep = Slice.FromChar(' ');
			var tokens = new[] { Slice.FromString("hello"), Slice.FromString("world"), Slice.FromString("!") };

			var joined = Slice.JoinBytes(sep, tokens);
			Assert.That(joined, Is.Not.Null);
			Assert.That(Encoding.ASCII.GetString(joined), Is.EqualTo("hello world !"));

			joined = Slice.JoinBytes(Slice.Empty, tokens);
			Assert.That(joined, Is.Not.Null);
			Assert.That(Encoding.ASCII.GetString(joined), Is.EqualTo("helloworld!"));

			joined = Slice.JoinBytes(sep, tokens, 0, 3);
			Assert.That(joined, Is.Not.Null);
			Assert.That(Encoding.ASCII.GetString(joined), Is.EqualTo("hello world !"));

			joined = Slice.JoinBytes(sep, tokens, 0, 2);
			Assert.That(joined, Is.Not.Null);
			Assert.That(Encoding.ASCII.GetString(joined), Is.EqualTo("hello world"));

			joined = Slice.JoinBytes(sep, tokens, 1, 1);
			Assert.That(joined, Is.Not.Null);
			Assert.That(Encoding.ASCII.GetString(joined), Is.EqualTo("world"));

			joined = Slice.JoinBytes(sep, tokens, 0, 0);
			Assert.That(joined, Is.Not.Null);
			Assert.That(joined.Length, Is.EqualTo(0));

			joined = Slice.JoinBytes(sep, new Slice[0], 0, 0);
			Assert.That(joined, Is.Not.Null);
			Assert.That(joined.Length, Is.EqualTo(0));

			joined = Slice.JoinBytes(sep, Enumerable.Empty<Slice>());
			Assert.That(joined, Is.Not.Null);
			Assert.That(joined.Length, Is.EqualTo(0));

			Assert.That(() => Slice.JoinBytes(sep, default(Slice[]), 0, 0), Throws.InstanceOf<ArgumentNullException>());
			Assert.That(() => Slice.JoinBytes(sep, default(IEnumerable<Slice>)), Throws.InstanceOf<ArgumentNullException>());

			Assert.That(() => Slice.JoinBytes(sep, tokens, 0, 4), Throws.InstanceOf<ArgumentOutOfRangeException>());
			Assert.That(() => Slice.JoinBytes(sep, tokens, -1, 1), Throws.InstanceOf<ArgumentOutOfRangeException>());
			Assert.That(() => Slice.JoinBytes(sep, tokens, 0, -1), Throws.InstanceOf<ArgumentOutOfRangeException>());
			Assert.That(() => Slice.JoinBytes(sep, tokens, 3, 1), Throws.InstanceOf<ArgumentOutOfRangeException>());
		}