static partial void WriteBinaryBodyTemplateCustom(MutagenWriter writer, IArmorAddonGetter item) { if (item.BodyTemplate.TryGet(out var templ)) { BodyTemplateBinaryWriteTranslation.Write(writer, templ); } }
private void AssertBinaryEquality(IRaceGetter race, string path) { var fs = new MockFileSystem(); using (var writer = new MutagenWriter(fs.FileStream.Create("C:/output", FileMode.Create), new WritingBundle(GameConstants.SkyrimSE) { MasterReferences = new MasterReferenceReader("Skyrim.esm"), FormVersion = race.FormVersion })) { BodyTemplateBinaryWriteTranslation.Write(writer, race.BodyTemplate !); } var exported = fs.File.ReadAllBytes("C:/output"); var expected = File.ReadAllBytes(path); exported.Should().Equal(expected); }