Exemplo n.º 1
0
 public void GetPathShouldReturnCorrectPath4()
 {
     string path = "a32,32 0 0,1 64,0";
     PathCommand sut = new PathCommand(path, 10, 20);
     Assert.True(sut.GetRelativePath() == "a32,32 0 0,1 64,0");
     Assert.True(sut.GetAbsolutePath() == "A32,32 0 0,1 74,20");
 }
Exemplo n.º 2
0
 public void GetPathShouldReturnCorrectPath1()
 {
     string path = "A32,32 0 0,1 82,64";
     PathCommand sut = new PathCommand(path);
     Assert.True(sut.GetRelativePath() == "a32,32 0 0,1 82,64");
     Assert.True(sut.GetAbsolutePath() == "A32,32 0 0,1 82,64");
 }
Exemplo n.º 3
0
 public void MPathCommandTest_()
 {
     string svgPath1 = "M18,24";
     string svgPath2 = "m18,24";
     PathCommand command1 = new PathCommand(svgPath1);
     PathCommand command2 = new PathCommand(svgPath1, 10, 20);
     PathCommand command3 = new PathCommand(svgPath2);
     PathCommand command4 = new PathCommand(svgPath2, 10, 20);
     Assert.True(command1.GetRelativePath() == "m18,24");
     Assert.True(command1.GetAbsolutePath() == "M18,24");
     Assert.True(command2.GetRelativePath() == "m8,4");
     Assert.True(command2.GetAbsolutePath() == "M18,24");
     Assert.True(command3.GetRelativePath() == "m18,24");
     Assert.True(command3.GetAbsolutePath() == "M18,24");
     Assert.True(command4.GetRelativePath() == "m18,24");
     Assert.True(command4.GetAbsolutePath() == "M28,44");
 }