Boo Nemerle IronRuby IronPython PHP
Shared by: 3HaI8U5
-
Stats
- views:
- 1
- posted:
- 11/10/2011
- language:
- pages:
- 11
Document Sample


Boo
Nemerle
IronRuby
IronPython
PHP/Phalanger
Just a specification!
Implementations in the class
library.
ハローキティ
ハローキティ
using System;
namespace LectureOne
{
class ハローキティConsoleApp
{
public static void Main(string[] args)
{
Console.WriteLine("Hallå katten!"); // yes, latin...
string s = "ハローキティ";
if (s[1] == 'ロ')
Console.WriteLine("Yep, we can work with Japanese.");
else
Console.WriteLine("No, no UTF-8 support.");
Console.ReadKey();
}
}
}
[TestFixture]
public class CustomerAndOrderTestFixture
{
Address addr;
Customer cust;
[SetUp] // 1
public void BeforeTest()
{
addr = new Address("Potatisåkern", "211 66", "Malmö");
}
[Test] // 2
public void CanCreateCustomer()
{
cust = new Customer("Karl", "Lindström", addr);
Assert.AreEqual(null, cust.Address.CO);
Assert.AreEqual("Potatisåkern", cust.Address.StreetName);
Assert.AreEqual("Karl", cust.FirstName);
Assert.AreEqual(Guid.Empty, cust.ID);
Assert.AreEqual("Lindström", cust.LastName);
}
}
[Test("Tests the total property of Order")] // attribute
public void TotalCost_NoItems()
{
Order order = new Order(cust, "SEK");
order.CreateOrderLine("Grunka", 1, 0); // cheap grunka.
Assert.AreEqual(0, order.Total);
order.CreateOrderLine("Ferrarri", 2, 1000000); // a million each
Assert.AreEqual(2000000, order.Total);
Assert.AreEqual(2, order.OrderLines.Count);
}
Get documents about "