public void GetFormatTest() { // arrange NbtDocument target; NbtFormat expected1; NbtFormat expected2; NbtFormat expected3; NbtFormat expected4; NbtFormat expected5; NbtFormat actual1; NbtFormat actual2; NbtFormat actual3; NbtFormat actual4; NbtFormat actual5; target = new NbtDocument(); expected1 = NbtFormat.Binary; expected2 = NbtFormat.Binary; expected3 = NbtFormat.Binary; expected4 = NbtFormat.Xml; expected5 = NbtFormat.Custom; // act actual1 = target.GetFormat(this.ComplexDataFileName); // gzip compressed binary actual2 = target.GetFormat(this.DeflateComplexDataFileName); // deflate compressed binary actual3 = target.GetFormat(this.UncompressedComplexDataFileName); // raw binary actual4 = target.GetFormat(this.ComplexXmlDataFileName); // xml actual5 = target.GetFormat(this.BadFileName); // invalid // assert Assert.AreEqual(expected1, actual1); Assert.AreEqual(expected2, actual2); Assert.AreEqual(expected3, actual3); Assert.AreEqual(expected4, actual4); Assert.AreEqual(expected5, actual5); }