Ejemplo n.º 1
1
 public void NeverBeenPoisonedOs()
 {
     var os = new Os("Hyper one");
     var PoisonChances = new Tuple<String, Double>[1];
     PoisonChances[0] = new Tuple<String, Double>("Hyper one", -1.46);
     var virus = new Virus("Sorry virus", PoisonChances);
     Assert.IsTrue(os.PoisonAttempt(virus));
 }
Ejemplo n.º 2
0
 public void AlwaysBeenPoisonedOs()
 {
     var os = new Os("Sorry os");
     var PoisonChances = new Tuple<String, Double>[1];
     PoisonChances[0] = new Tuple<String, Double>("Sorry os", 1.46);
     var virus = new Virus("Hyper virus", PoisonChances);
     Assert.IsFalse(os.PoisonAttempt(virus));
 }
 public Computer(Os os)
 {
     this.Os = os;
     this.Virus = new Virus();
 }
 public Computer(Os os)
 {
     this.Os    = os;
     this.Virus = new Virus();
 }