Namespace: Blocks
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Tests: Blocks.Tests.BlocksContentTests
Tests: Blocks.Tests.FruitBlocksContentTests
Tests: Blocks.Tests.JewelBlocksContentTests
4 unit tests call Blocks.BlocksContent.Prefix
1 unit tests call Blocks.BlocksContent.Prefix
1 unit tests call Blocks.BlocksContent.Prefix
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: StringRemarks
Remarks
Remarks
Examples
[Test, CloseAfterFirstFrame] public void GetFilenameWithoutPrefix() { var content = new JewelBlocksContent { Prefix = "ABC" }; Assert.AreEqual("DEF", content.GetFilenameWithoutPrefix("ABCDEF")); Assert.Throws<BlocksContent.FilenameWrongPrefixException>( () => content.GetFilenameWithoutPrefix("ADEF")); Assert.Throws<BlocksContent.FilenameWrongPrefixException>( () => content.GetFilenameWithoutPrefix("AAADEF")); }
[Test, CloseAfterFirstFrame] public void LoadContentWithNoPrefixSet() { var material = new Material(ShaderFlags.Position2DColoredTextured, "FruitBlocks_Block1"); Assert.IsNotNull(material.DiffuseMap); }
[Test, CloseAfterFirstFrame] public void LoadContentWithPrefixSet() { var content = new JewelBlocksContent { Prefix = "Mod1_" }; var material = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo"); new Sprite(material, new Rectangle(0.3f, 0.45f, 0.1f, 0.1f)); content.Prefix = "Mod2_"; material = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo"); new Sprite(material, new Rectangle(0.6f, 0.45f, 0.1f, 0.1f)); }
Examples
[Test, CloseAfterFirstFrame] public void Constructor() { var content = new FruitBlocksContent(); Assert.AreEqual("FruitBlocks_", content.Prefix); Assert.IsTrue(content.AreFiveBrickBlocksAllowed); Assert.IsTrue(content.DoBricksSplitInHalfWhenRowFull); }
Examples
[Test, CloseAfterFirstFrame] public void Constructor() { var content = new JewelBlocksContent(); Assert.AreEqual("JewelBlocks_", content.Prefix); Assert.IsTrue(content.AreFiveBrickBlocksAllowed); Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull); }
See Also