Exemple #1
0
 public void ILStrings_Typical()
 {
     var overlay = new StringsLookupOverlay(_ILstringsFormat, StringsFileFormat.LengthPrepended);
     Assert.Equal(_strs.Count, overlay.Count);
     Assert.True(overlay.TryLookup(1, out var str));
     Assert.Equal(_strs[0], str);
     Assert.True(overlay.TryLookup(4, out str));
     Assert.Equal(_strs[3], str);
 }
Exemple #2
0
        public void IlTypical()
        {
            var overlay = new StringsLookupOverlay(
                IlStringsFormat,
                StringsFileFormat.LengthPrepended,
                new MutagenEncodingProvider()
                .GetEncoding(GameRelease.SkyrimSE, Language.English));

            Assert.Equal(Strs.Count, overlay.Count);
            Assert.True(overlay.TryLookup(1, out var str));
            Assert.Equal(Strs[0], str);
            Assert.True(overlay.TryLookup(4, out str));
            Assert.Equal(Strs[3], str);
        }
Exemple #3
0
        public void IlOutOfRange()
        {
            var overlay = new StringsLookupOverlay(
                IlStringsFormat,
                StringsFileFormat.LengthPrepended,
                new MutagenEncodingProvider()
                .GetEncoding(GameRelease.SkyrimSE, Language.English));

            Assert.False(overlay.TryLookup(56, out _));
        }
Exemple #4
0
        public void FrenchStrings()
        {
            var overlay = new StringsLookupOverlay(
                FrenchStringsFormat,
                StringsFileFormat.Normal,
                new MutagenEncodingProvider()
                .GetEncoding(GameRelease.SkyrimSE, Language.French));

            overlay.Count.Should().Be(1);
            overlay.TryLookup(1, out var str)
            .Should().BeTrue();
            str.Should().Be(FrenchString);
        }
        public void Strings_OutOfRange()
        {
            var overlay = new StringsLookupOverlay(_stringsFormat, StringsFileFormat.Normal);

            Assert.False(overlay.TryLookup(56, out _));
        }
        public void ILStrings_OutOfRange()
        {
            var overlay = new StringsLookupOverlay(_ILstringsFormat, StringsFileFormat.LengthPrepended);

            Assert.False(overlay.TryLookup(56, out _));
        }