public void ParseEmpty() { var map = new An8Map(); map.Parse( @" "); }
public void NewMap() { var map = new An8Map(); Assert.Null(map.Kind); Assert.Null(map.TextureName); Assert.Null(map.TextureParams); }
public void ParseOther() { var map = new An8Map(); map.Parse( @" other { } "); }
public void ParseTextureParams() { var map = new An8Map(); map.Parse( @" textureparams { } "); Assert.NotNull(map.TextureParams); }
public void ParseTextureName() { var map = new An8Map(); map.Parse( @" texturename { ""abc"" } "); Assert.Equal("abc", map.TextureName); }
public void ParseKind() { var map = new An8Map(); map.Parse( @" kind { ""abc"" } "); Assert.Equal("abc", map.Kind); }
public void GenerateTextEmpty() { var map = new An8Map(); var text = map.GenerateText(); string expected = @"map { kind { """" } texturename { """" } } "; Assert.Equal( expected.Replace("\r\n", "\n"), text.Replace("\r\n", "\n")); }
public void GenerateTextTextureParams() { var map = new An8Map(); map.TextureParams = new An8TextureParams(); var text = map.GenerateText(); string expected = @"map { kind { """" } texturename { """" } textureparams { blendmode { decal } alphamode { none } percent { 100 } } } "; Assert.Equal( expected.Replace("\r\n", "\n"), text.Replace("\r\n", "\n")); }