Inheritance: ToTypeScript
Esempio n. 1
0
 public void GetTypescriptType_ArrayLike_Test()
 {
     var writer = new EnumToTypeScript(typeof(Fruits).ToTypeScript(), false);
     var lines = writer.GetLines();
     string ts = lines.JoinNewLine();
     Assert.IsTrue(ts.Contains("enum Fruits"));
     Assert.IsTrue(ts.Contains("Apple = 0,"));
     Assert.IsTrue(ts.Contains("Orange = 5,"));
     Assert.IsTrue(ts.Contains("Ananas = 6,"));
 }
Esempio n. 2
0
 public void EnumTypesNotIntNotSupported()
 {
     var writer = new EnumToTypeScript(typeof(SomeEnumHexa).ToTypeScript(), false);
     var value = writer.GetLines().ToList();
     Assert.Fail("Should not reach this point", value);
 }