public void TestCreateSuccess() { // arrange var expected = new UserEntity(); var fixture = new UserMySqlDataStore(new MySqlDataStoreConnection( "Server=143.110.159.170;Port=3306;Database=donstringham;Uid=donstringham;Pwd=letmein;" )); // act and assert Assert.ThrowsException <NotImplementedException>(() => fixture.Create(expected)); }
public void TestReadAllOneRecord() { // arrange MySqlDataStoreConnection conn = new MySqlDataStoreConnection( "Server=143.110.159.170;Port=3306;Database=donstringham;Uid=donstringham;Pwd=letmein;" ); UserMySqlDataStore fixture = new UserMySqlDataStore(conn); UserEntity usr = new UserEntity(); usr.SetId("*****@*****.**"); usr.Name = "Example"; var Expected = typeof(IDomain[]); // act fixture.Create(usr); IDomain[] actual = fixture.ReadAll(); // assert Assert.IsInstanceOfType(actual, Expected); Assert.AreEqual(1, actual.Length); fixture.DeleteAll(); }